Re: AX_CXX_COMPILE_STDCXX fails to select default C++ standard automatically
Sam James <[email protected]> Sun, 29 Mar 2026 17:27:30 +0100
| Newsgroups | gmane.comp.sysutils.autoconf.bugs |
|---|---|
| Organization | Gentoo |
| Message-ID | <[email protected]> |
--=-=-= Content-Type: text/plain Tom Lane <[email protected]> writes: > Yuri <[email protected]> writes: >> Expected behavior: > >> * |AX_CXX_COMPILE_STDCXX| should automatically detect and use the >> highest supported standard if the user does not provide any flags. > > Is "highest supported standard" really the right decision rule? > I would personally have expected "use the compiler's default", > if no other guide is available. It's actually unsafe as well, because a compiler may support newer -std=XYZ but it could be experimental at least wrt ABI. GCC does that and I think Clang does as well (at least for libstdc++, it has no choice). So, say, -std=c++26 being supported by the compiler doesn't mean it should be used. > [...] sam --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEBBAEWCgCpFiEEJaa7iN2bdkxrVUHCc4QJ9SDfkZAFAmnJUvIbFIAAAAAABAAO bWFudTIsMi41KzEuMTIsMiwyXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25z Lm9wZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQyNUE2QkI4OEREOUI3NjRDNkI1NTQx QzI3Mzg0MDlGNTIwREY5MTkwDxxzYW1AZ2VudG9vLm9yZwAKCRBzhAn1IN+RkPPK AP9ecy9Gw0u7DBBAf+GsmxoMZ+1uZPRlRBZZ/HJG2tP3uQD/Qkh5htZk+QEeBIgN RrqUFjaxG32NeXrKHpCS8uw4IA0= =RgML -----END PGP SIGNATURE----- --=-=-=--