This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/77948] New: Option processing of -std=c++11 -std=gnu++11 doesn't reset ext_numeric_literals
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 12 Oct 2016 09:03:37 +0000
- Subject: [Bug c++/77948] New: Option processing of -std=c++11 -std=gnu++11 doesn't reset ext_numeric_literals
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77948
Bug ID: 77948
Summary: Option processing of -std=c++11 -std=gnu++11 doesn't
reset ext_numeric_literals
Product: gcc
Version: 6.2.1
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: rguenth at gcc dot gnu.org
Target Milestone: ---
int main(int argc, char *argv[])
{
__float128 f = 1.0Q;
return 0;
}
> g++-6 t.C -std=c++11 -std=gnu++11
t.C: In function ‘int main(int, char**)’:
t.C:3:18: error: unable to find numeric literal operator ‘operator""Q’
__float128 f = 1.0Q;
^~~~
t.C:3:18: note: use -std=gnu++11 or -fext-numeric-literals to enable more
built-in suffixes
possibly because we do
case OPT_std_c__11:
case OPT_std_gnu__11:
if (!preprocessing_asm_p)
{
set_std_cxx11 (code == OPT_std_c__11 /* ISO */);
if (code == OPT_std_c__11)
cpp_opts->ext_numeric_literals = 0;
}
break;
but do _not_ set it to 1 for code == OPT_std_gnu__11. Adding
-fext-numeric-literals as first argument works (-std=c++11 doesn't reset it).