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
          Reporter: rguenth at gcc dot
  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;

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).

Reply via email to