This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GCC headers and DJGPP port


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]