Regression with [C++11] PR54413 Option for turning off compiler extensions for numeric literals.

2012-11-14 Thread Hans-Peter Nilsson
From: Ed Smith-Rowland 3dw...@verizon.net Date: Fri, 9 Nov 2012 05:55:16 +0100 libcpp 2012-11-09 Ed Smith-Rowland 3dw...@verizon.net PR c++/54413 * include/cpplib.h (cpp_interpret_float_suffix): Add cpp_reader* arg. (cpp_interpret_int_suffix): Add cpp_reader*

Re: [C++11] PR54413 Option for turning off compiler extensions for numeric literals.

2012-11-09 Thread Jason Merrill
On 11/08/2012 11:55 PM, Ed Smith-Rowland wrote: +literal number suffixes as Gnu extensions. GNU is all-caps. OK with that change. Jason

Re: [C++11] PR54413 Option for turning off compiler extensions for numeric literals.

2012-11-08 Thread Ed Smith-Rowland
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

Re: [C++11] PR54413 Option for turning off compiler extensions for numeric literals.

2012-11-07 Thread Jason Merrill
On 11/06/2012 05:20 PM, 3dw...@verizon.net wrote: So how about -f[no-]ext-numeric-literals Sure. I think the ideal behavior for these suffixes would be to treat them as user-defined literals if a corresponding literal operator is available, or use the built-in extension if not. But that

Re: [C++11] PR54413 Option for turning off compiler extensions for numeric literals.

2012-11-07 Thread Jakub Jelinek
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

Re: [C++11] PR54413 Option for turning off compiler extensions for numeric literals.

2012-11-06 Thread Jason Merrill
Why three separate flags? The flag(s) need(s) to be documented in doc/invoke.texi. @@ -721,7 +733,12 @@ case OPT_std_c__1y: case OPT_std_gnu__1y: if (!preprocessing_asm_p) - set_std_cxx1y (code == OPT_std_c__11 /* ISO */); + { + set_std_cxx1y (code ==

Re: Re: [C++11] PR54413 Option for turning off compiler extensions for numeric literals.

2012-11-06 Thread 3dw4rd
On 11/06/12, Jason Merrillja...@redhat.com wrote: Why three separate flags? I thought extra flexibility might be wanted. On the other hand, *I* would never turn off just one set. I expect a food fight over all flags. Also, if, as seems reasonable, strict ANSI turns off all gnu

[C++11] PR54413 Option for turning off compiler extensions for numeric literals.

2012-11-04 Thread Ed Smith-Rowland
There is a request to be able to turn off interpretation of several suffixes for gcc extension numeric literals to make way for C++-1Y or various std libraries to claim several suffixes currently used for gnu extensions. This patch interprets the suffixes according to the current extension