This is the mail archive of the
mailing list for the GCC project.
Re: C++ PATCH: Disallow floating-point literals in integral-constant expressions
- From: Mike Stump <mrs at apple dot com>
- To: mark at codesourcery dot com
- Cc: gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Mon, 31 Jan 2005 17:25:47 -0800
- Subject: Re: C++ PATCH: Disallow floating-point literals in integral-constant expressions
- References: <200502010102.j1112IsD021436@sethra.codesourcery.com>
On Jan 31, 2005, at 5:02 PM, Mark Mitchell wrote:
The standard says that floating-point literals are only allowed in
integral constant expressions if they are immediately cast to an
integral or enumeration type. When I implemented checks for integral
constant-expressions, I failed to check this case. Remedied with the
If users have this in their code, then this can be seen as a removal of
a feature by them. In that case, we should warn about it for a
release, then make it an error, or put it under -fpermissive.
It'll take us around 3 months to notice if this is so used. I'm hoping
that other people make just know, or can run a world build against
their favorite large source base (100+ M lines).