Date: Mon, 10 Nov 2008 17:54:21 +0100 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> To: Roman Divacky <rdivacky@FreeBSD.ORG> Cc: current@FreeBSD.ORG Subject: Re: [RFC]: c99 compiled world Message-ID: <86myg734jm.fsf@ds4.des.no> In-Reply-To: <20081110162304.GA4169@zim.MIT.EDU> (David Schultz's message of "Mon, 10 Nov 2008 11:23:04 -0500") References: <20081106185512.GA33153@freebsd.org> <867i7b4qau.fsf@ds4.des.no> <863ahz4q4i.fsf@ds4.des.no> <20081110162304.GA4169@zim.MIT.EDU>
index | next in thread | previous in thread | raw e-mail
David Schultz <das@FreeBSD.ORG> writes:
> The default is -std=gnu89, which as far as I know is almost identical
> to -std=gnu99. Actually, the only difference I'm aware of is that in
> more recent gcc releases, GNU99 mode uses the C99 rules for inline
> functions.
No, the differences are far greater. Try compiling the following
program in gnu89 mode:
void *restrict p;
int main(void) { for (int i = 0; i < 1; ++i) continue; }
Right off the bat, I can't think of a language construct that is legal
in gnu99 but not in c99, but I'm sure they exist.
BTW, the definition of gnu89 has changed over time. I believe that
early versions of gcc 3 would accept the following:
int main(void) { for (int i = 0; i < 1; ++i) continue; return i; }
DES
--
Dag-Erling Smørgrav - des@des.no
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86myg734jm.fsf>
