autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C99 support


From: Roger Leigh
Subject: Re: C99 support
Date: Sun, 28 Nov 2004 18:09:08 +0000
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andreas Schwab <address@hidden> writes:

> Roger Leigh <address@hidden> writes:
>
>> Are there any tests I can use to specify that I want a C99 compiler?
>> AC_PROG_CC isn't sufficient.
>
> IMHO the preferred way is to check for the specific features you need
> (eg. with AC_COMPILE_IFELSE) and abort when not provided (or maybe use
> workarounds instead).

I can use the tests for basic stuff like:

- - _Bool
- - inline
- - restrict

and these work well.  What it doesn't do is let me use features such
as mixed declarations and code.  These require you to use "gcc
- -std=c99" or "c99" or similar, and I can't enable this portably.  If
autoconf could find out how to put a given compiler into C99 mode,
that would be great (in the same way as AC_PROG_GCC_TRADITIONAL
works for K&R C).

Once the GCC default is C99 rather than C89, the problem will be
lessened, but this still won't help with non-GCC compilers such as Sun
CC etc., where I might want to abort with an error if it can't be made
to build C99 code.


Regards,
Roger

- -- 
Roger Leigh
                Printing on GNU/Linux?  http://gimp-print.sourceforge.net/
                Debian GNU/Linux        http://www.debian.org/
                GPG Public Key: 0x25BFB848.  Please sign and encrypt your mail.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iD8DBQFBqhRCVcFcaSW/uEgRAv0QAJ4zB4Poe9uDFz1sLoq9Vch4owUPaACfckZ/
6gcjs8XkK+JVHEwATr2GEpA=
=RnBg
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]