Can you please also check for the following features? variable declarations in for loops last member of a struct may be an incomplete array type varargs macros named initialization of structs variable length arrays long long These are all features that C99-ish programs are likely to want.
I'm not sure this is a good idea, because:
Paul Eggert also wrote: > Part of the motivation for keeping that stuff hidden is that we don't > want people to switch based on whether our macro "thinks" the compiler > is "C99" or "C89" or "not". They should switch based on the > particular feature that they need.
As you yourself point out, the purpose of the AC_PROG_CC_C99 macro is to discover compiler flags that put the compiler in a C99-ish mode, *not* to guarantee that the compiler completely conforms to the C++ standard.
For example, suppose I want C99 mode because I want to use complex arithmetic...and the compiler/libc mostly supports this, but variable-length arrays are somewhat broken. I want AC_PROG_CC_C99 to pass and put the compiler in C99 mode, and then I can check for complex-arithmetic support. With your suggestion, AC_PROG_CC_C99 might fail because of features I don't need.
AC_PROG_CC_C99 should, ideally, test the minimal set of features that pass in C99 mode and fail in non-C99 mode. In practice, it should test slightly more than the minimum in order to have a better chance of working on not-yet-tested compilers. It should certainly be very, very far from comprehensive, however.
Steven
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf