[RFC]: c99 compiled world

David Schultz das at FreeBSD.ORG
Mon Nov 10 08:35:31 PST 2008

On Mon, Nov 10, 2008, Dag-Erling Smørgrav wrote:
> Dag-Erling Smørgrav <des at des.no> writes:
> > Roman Divacky <rdivacky at freebsd.org> writes:
> > > I tried to compile world in C99 (in fact gnu99) gcc mode. It compiles
> > > correctly with two trivial exceptions [...]
> > No, it won't.  You must have made a mistake.  C99 / GNU99 mode disables
> > pretty much everything except the standard C library functions [...]
> (or at least, it should; if it doesn't, <sys/cdefs.h> should be fixed)

What you just said applies to -std=c99, not -std=gnu99. The latter
includes all the extensions, so it should work.

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. Whether world compiles with newer (GPL3)
versions of gcc might be a worthwhile consideration in changing
the default here.

More information about the freebsd-current mailing list