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++ PATCH: Disallow floating-point literals in integral-constantexpressions


Jonathan Wakely wrote:
On Tue, Feb 01, 2005 at 11:55:58AM -0800, Mark Mitchell wrote:
Is this OK? Have I correctly described the extensions?

Thank you for taking a stab at the documentation.


Not quite. There are two completely orthogonal extensions: (1) we allow floating-point literals in integral constant expressions, and (2) we allow in-class initialization of static data members of floating-point type.

An example of (1) without (2) is something like:

enum E { e = int(2.2 + 3.7) };

which is invalid ISO C++, but is accepted by G++, without -pedantic.

Should I try to
fix the alignment of the menu at the top of the file?

Joseph Myers is probably the right person to ask about that.


I think that you should also move these descriptions under "Deprecated Features", as nobody objected to deprecating this extension.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
(916) 791-8304


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