RFA PATCH to get_narrower for c++/48106 (ICE with scoped enum)
Jason Merrill
jason@redhat.com
Mon May 23 15:04:00 GMT 2011
C++0x scoped enums don't implicitly convert to an integral type, so we
need to be careful about throwing away explicit conversions. In this
case, the static_cast<int>(e) creates a NOP_EXPR which get_narrower
throws away, but 'e' itself is not a valid argument for &, so we need to
replace the NOP_EXPR with a different one.
Tested x86_64-pc-linux-gnu. OK for trunk?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 48106.patch
Type: text/x-patch
Size: 1262 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110523/073b9813/attachment.bin>
More information about the Gcc-patches
mailing list