Re: Selecting a C++ standard

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

 



On 10/30/2012 09:11 AM, Adrian Bunk wrote:
> if your example program would be built using autoconf, it would 
> behave differently depending on the autoconf version used.

Yes, it's possible to write C89 programs that silently
change meaning if compiled with C99.  Here's an other example,
which I gave in September:

    int N = (1//* this sets N to 1 in C99, and to 0 in C89.  Ouch?^!#*/-2
             + (INT_MAX < INT_MIN));

But these examples are contrived, and are not likely to happen
in real code.  If these are all we have to worry about, there's
no significant risk in defaulting to the latest standard.

Things were much riskier 20 years ago, because C89 *did*
introduce incompatible changes that broke existing apps.
But back then Autoconf was already in the "let's use the latest
version" camp: its AC_PROG_CC macro defaulted to C89, even though
this was risky.  It makes sense to continue to default to the
latest version, especially since it's less risky now.

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://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