This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/51912] [C++11] G++ accepts floating point case labels
- From: "paolo.carlini at oracle dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 29 May 2012 13:58:21 +0000
- Subject: [Bug c++/51912] [C++11] G++ accepts floating point case labels
- Auto-submitted: auto-generated
- References: <bug-51912-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51912
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |paolo.carlini at oracle dot
| |com
--- Comment #2 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-05-29 13:58:21 UTC ---
Jason, I'm thinking that this should be doable rather easily by adding a new
LOOKUP_NO_NON_INTEGRAL mask and passing it down to standard_conversion from
case_conversion via perform_implicit_conversion_flags.
Then standard_conversion can exclude all such non-integral conversions, eg, for
this specific testcase, return NULL from line #1332 because fcode == REALTYPE
&& (flags & LOOKUP_NO_NON_INTEGRAL)).
Makes sense?