Re: C99 support

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

 



prj@xxxxxxxxxxx (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.


_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf

[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux