This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC headers and DJGPP port
- To: eliz at is dot elta dot co dot il
- Subject: Re: GCC headers and DJGPP port
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Mon, 17 Jul 2000 23:02:50 +0200
- CC: mrs at windriver dot com, gcc at gcc dot gnu dot org, djgpp-workers at delorie dot com
- References: <200007171736.KAA29313@kankakee.wrs.com> <200007171834.OAA06211@indy.delorie.com>
> 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