[C++ PATCH] Don't segv in cvt.c (PR c++/59838)

2014-01-17 Thread Marek Polacek
This prevents segfault in ocp_convert. If the ENUM_UNDERLYING_TYPE is NULL, don't call int_fits_type_p on it. We give meaningful error message on the attached testcase; it's the same message as GCC 3.4/4.0.2/4.4 gave (these GCC didn't ICE on it). Bootstrapped/regtested on x86_64-linux, ok for

Re: [C++ PATCH] Don't segv in cvt.c (PR c++/59838)

2014-01-17 Thread Jason Merrill
OK. Jason