https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70529
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |manu at gcc dot gnu.org --- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #1) > So, either use the GNU extension modes (-std=gnu++11, -std=gnu++14), or wait > for -std=c++17. According to the manual, if an extension is not incompatible with the base standard, it should not be disabled: "When a base standard is specified, the compiler accepts all programs following that standard plus those using GNU extensions that do not contradict it." If one wants to distinguish between exponents with sign and without, it would be better if libcpp parses the hext-float while keeping track of the location_t of the sign (or UNKNOWN_LOCATION if not present). Then give a pedwarn (conditional on -Wpedantic) if location_t != UNKNOWN_LOCATION for the relevant standards. Having the location of the sign also will allow gcc to give a more precise warning: warning: signed exponent in hexadecimal float is a GNU extension [-Wpedantic] auto d = 0x123p-2; ^