https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87274

            Bug ID: 87274
           Summary: -std=c++11 breaks quadmath macros
           Product: gcc
           Version: 8.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lopresti at gmail dot com
  Target Milestone: ---

Test case:

#include <quadmath.h>

__float128 doit()
{
  return FLT128_MAX;
}


Compile with "g++ -std=c++11" to get the error:

/tmp/quadmath.cc: In function \u2018__float128 doit()\u2019:
/tmp/quadmath.cc:5:10: error: unable to find numeric literal operator
\u2018operator""Q\u2019
   return FLT128_MAX;
          ^~~~~~~~~~
/tmp/quadmath.cc:5:10: note: use -fext-numeric-literals to enable more built-in
suffixes


Note that my code does not use any quad-precision literals; just the documented
`FLT128_MAX` macro.

I realize quadmath is more a C thing than a C++ thing... But it would still be
nice if this worked, IMO.

On a possibly related note, writing "__extension__" before a quad-precision
literal does not silence this error. Perhaps it should (?)

Reply via email to