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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux