|
|
Subscribe / Log in / New account

GNU autoconf-2.70 released

GNU autoconf-2.70 released

Posted Dec 10, 2020 16:50 UTC (Thu) by zwol (guest, #126152)
In reply to: GNU autoconf-2.70 released by Sesse
Parent article: GNU Autoconf 2.70 released

Compilers have this nasty tendency to set the value of __cplusplus (or __STDC_VERSION__ for C) aspirationally, before they're done implementing the new version of the standard. (It makes sense on the development branch: you need the new value of the macro in place early so you can implement things that key off of it in the headers. The trouble is, then that gets into a production release before it's fully debugged.) Autoconf's test for C2011-conformant anonymous unions makes a good example of the problems we have to weed out.

"Why don't you have a separate AC_C_ANONYMOUS_UNIONS test for that?" I hear you ask. We do offer that kind of specific test, but it's intended for features that were first implemented in isolation and got rolled into a standard update later, like inline in C. If you are writing new code in C++11 or whatever, we'd like you to be able to rely on __cplusplus and not have to do a bunch of configure-time tests that are, in principle, redundant to the version of the standard you asked for.


to post comments

GNU autoconf-2.70 released

Posted Dec 10, 2020 21:07 UTC (Thu) by madscientist (subscriber, #16861) [Link] (1 responses)

Or the reverse: they won't set the value at all because some aspect of the standard isn't fully supported even though most of it is supported. Visual Studio, for example, reported a value for C++98 or something until the last release or two. This makes testing __cplusplus practically useless for any portable application to see what features are available.

GNU autoconf-2.70 released

Posted Dec 19, 2020 21:15 UTC (Sat) by jengelh (guest, #33263) [Link]

That's where __has_cpp_attribute() comes in.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds