Orphaning GCL

Miloslav Trmač mitr at volny.cz
Wed Nov 5 14:17:31 UTC 2008


Bryn M. Reeves píše v St 05. 11. 2008 v 14:05 +0000:
> Jerry James wrote:
> > On Wed, Nov 5, 2008 at 6:32 AM, Richard W.M. Jones <rjones at redhat.com> wrote:
> >> On Mon, Nov 03, 2008 at 08:45:29PM -0700, Jerry James wrote:
> >>> int main() {
> >>> #include <unistd.h>
> >>>   return 0;
> >>> }
> >> Is it supposed to be possible to compile this?
> > 
> > No, that's not legal C.  I didn't know that, so I learned something
> > from the experience, which makes it a good one.  I sent a patch
> > upstream yesterday to fix the GCL code so it doesn't do this.
> 
> OT but.. That snippet *is* legal C, but the validity of compiling this 
> file then depends on the content of unistd.h
>From the point of the C standard, this is "not invalid" because C
doesn't say anything about unistd.h, so this might be a conforming (but
not a strictly conforming) C program.

It is not a conforming POSIX application, though: see XSI 2.2.2:
> If used, the application shall ensure that a header is included
> outside of any external declaration or definition ...
	Mirek




More information about the devel mailing list