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