autoconf
[Top][All Lists]
Advanced

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

Re: C99 support


From: Bob Friesenhahn
Subject: Re: C99 support
Date: Mon, 29 Nov 2004 15:43:19 -0600 (CST)

On Mon, 29 Nov 2004, Roger Leigh wrote:

Do you have a purpose for using C99 other than to intentionally write
non-portable software?

Yes: I would like to use C99 features, and the current autoconf
support isn't adequate.  I can portably make use of _Bool, inline and
restrict, but that's it.  The things I currently use, or would like to
use, are:

- - C++-style comments
- - long long
- - Mixed declarations and code
- - Declarations in for loops.
- - Named Initialisers for structs

None of these are strictly /necessary/, but I do believe the latter
three do make for cleaner, more maintainable code.

For sure many C99 features make for cleaner, more maintainable code, but vendors are moving very slowly toward it (user demand seems low), and users need to upgrade their compilers when compliant compilers are available, so use of C99 features will certainly reduce portability of your code for the next couple of years.

and the remaining issues are library issues, hopefully to come with a
future glibc.  I do think autoconf should support it--it is the
current C standard.

For many years (8?, 10?), open source software continued to use K&R syntax or provide translators to K&R syntax, after the original ANSI C standard was solidified. This should give you some idea how glacial the tool-base is.

Some constructs such as 'long long' and 'inline' have been supported as common extensions for years so they are commonly available in existing compilers, or can easily be substituted with something else.

The use of C++-style comments in open source C code is suspect. IBM's AIX C compiler does not support them.

Bob
======================================
Bob Friesenhahn
address@hidden
http://www.simplesystems.org/users/bfriesen




reply via email to

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