GCC headers and DJGPP port
Martin v. Loewis
martin@loewis.home.cs.tu-berlin.de
Mon Jul 17 14:10:00 GMT 2000
> How about a system with its own stddef.h? Standard types such as
> size_t, wchar_t, the definition of NULL -- these are surely closely
> related to the internals of a library, right? And GCC has no means
> of knowing how to define these correctly for the library, right?
Wrong. GCC needs to know exactly what size_t and wchar_t is, and it
must also provide the definition of NULL. size_t must be known so the
builtin functions can be declared properly. wchar_t must be known so
wide string literals can be emitted correctly. NULL is defined as
__null on all platforms now, so that overloading works correctly in
C++ (for C, it is something different).
Now, the exact mechanism *how* it is achieved that the header file is
an exact match of the target understanding of these types is a tricky
question, however, there is no question *that* gcc must know about
these types even without seeing a single target header file.
Regards,
Martin
More information about the Gcc
mailing list