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]

Re: using __float128 and -std=c++11


On 13 October 2015 at 10:31, Marc Glisse wrote:
> On Tue, 13 Oct 2015, Peter van Hoof wrote:
>
>> 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...
>
>
> A more recent version of the compiler should give you a hint about using
> gnu++11 instead (or some other flag I have forgotten).

q.cc:4:16: note: use -std=gnu++11 or -fext-numeric-literals to enable
more built-in suffixes


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