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: RFA PATCH to get_narrower for c++/48106 (ICE with scoped enum)


On 05/23/2011 11:01 AM, Richard Guenther wrote:
Ok.  Though I wonder where you enter folding before you check semantic
validity.

The problem is in c-common:shorten_binary_op, which uses get_narrower and then calls common_type on the types of the results. There is no common type between a scoped enum and char, so common_type returns NULL_TREE, so we get a SEGV in c_common_signed_or_unsigned_type.


Do you think I should change shorten_binary_op instead?

Jason


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