Stefanos via Tinycc-devel <[email protected]> wrote:
[omitted for brevity]
> Now, what's more interesting, is that if we open the standard stdio.h
> located at /usr/include/, at least in GNU / Linux Debian's case, we will
> notice at the very top, right after __BEGIN_DECLS that we have
> 
> #define __need_size_t
> #define __need_NULL
> #include <stddef.h>
> 
> Thus, the implicit inclusion you were looking for.

it is important to note that the intent of glibc here is to have size_t and 
NULL defined
and not to define offsetof, which it doesn't - which is done with those __need_ 
macros
this is nonstandard - in the n3467 working draft of ISO/IEC 9899:202y (en) 
under 7.21.1:
        The header <stddef.h> defines the following macros and declares the 
following types. Some are
        also defined in other headers, as noted in their respective subclauses.
        [...]
        The types are
        ptrdiff_t
        [...]

> 
> Now, how TCC parses this specific stddef.h header file to point at
> /usr/local/lib/tcc/include/stddef.h goes beyond my knowledge.

it's the only stddef.h within the implicity-defined include paths that could be 
found
tcc's stddef.h unconditionally defines ptrdiff_t, etc. - as it should

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to