This is the mail archive of the gcc-patches@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: [C++11] PR54413 Option for turning off compiler extensions for numeric literals.


On 11/07/2012 10:29 AM, Jakub Jelinek wrote:
On Wed, Nov 07, 2012 at 10:22:57AM -0500, Jason Merrill wrote:
I thought about that. We'd need some machinery that would allow cpp to query what has been declared already.
Or alternately, always treat them as user-defined in C++ mode and
have the front end decide to use the built-in interpretation if no
literal operator is declared.
Yeah, I think that would be best.

Jakub

OK, this passes x86_64-linux. This is my first rodeo with *.texi.

I just have one flag: -fext-numeric-literals.
It leaves gnu extension suffixes for std=gnu++*, and std=c++98.
I sets the flag off (use suffixes for user-defined literals) for std=c++11+.

Ed

Attachment: CL_no_nonstd_literals6
Description: Text document

Attachment: patch_no_nonstd_literals6
Description: Text document


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