This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

using __float128 and -std=c++11


Consider the following program

#include <quadmath.h>
__float128 a()
{
	return FLT128_MAX;
}

When I compile this with any of these commands

g++ -c prog.cc
g++ -std=c++98 -c prog.cc
g++ -std=c++03 -c prog.cc

it compiles just fine. However, when I use this

g++ -std=c++11 -c prog.cc

I get the error message

In file included from prog.cc:1:0:
prog.cc: In function â__float128 a()â:
prog.cc:5:9: error: unable to find numeric literal operator âoperator"" Qâ
  return FLT128_MAX;
         ^
I suspect this is a compiler bug, but would like to double-check first before submitting a report. The compiler doesn't complain about the use of __float128, so I guess that type is deemed compliant with the C++11 standard. So I would assume that I should also be allowed to use __float128 literals...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]