[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C99 support
From: |
Paul Eggert |
Subject: |
Re: C99 support |
Date: |
Tue, 30 Nov 2004 00:10:12 -0800 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
address@hidden (Paul Jarc) writes:
> E.g., in C90, size_t fits in unsigned long, but in C99, it may not.
This is not a problem for GNU or POSIX-compliant software. The GNU
Coding Standards say that you need not worry about this misfeature of
C99. Also, POSIX 1003.1-2001 requires implementations to support a
compilation environment where size_t fits in unsigned long. (It may
be a problem for non-GNU, non-POSIX software, but that's less
important.)
However, there are several places where C99 is not upward compatible
with C89. Here is a trivial example:
int A = (1 //**/ - 1
+ 1);
This sets A to 1 in C99, but to 0 in C89. This is not the only
gotcha, of course.
I also like the idea of having a macro that tries to set a compiler
into C99 mode. I want it to set into into "C99 + local extensions"
mode, not "pedantic C99" mode. I'd like someone to test this on a
wide variety of compilers, though.
- Re: C99 support, (continued)
- Re: C99 support, Roger Leigh, 2004/11/29
- Re: C99 support, Bob Friesenhahn, 2004/11/29
- Re: C99 support, Roger Leigh, 2004/11/29
- Re: C99 support, Bob Friesenhahn, 2004/11/29
- Re: C99 support, Austin Schutz, 2004/11/29
- Re: C99 support, Ralf Wildenhues, 2004/11/30
- Re: C99 support, Paul Eggert, 2004/11/30
- Re: C99 support, Ralf Wildenhues, 2004/11/30
- Re: C99 support, Ralf Wildenhues, 2004/11/30
- Re: C99 support, Paul Jarc, 2004/11/29
- Re: C99 support,
Paul Eggert <=