Re: [C++ PATCH] Fix error-recovery for invalid enumerators (PR c++/79896)

2017-03-10 Thread Jason Merrill
OK. On Tue, Mar 7, 2017 at 2:00 PM, Jakub Jelinek wrote: > Hi! > > Doing copy_node on error_mark_node doesn't work too well, lots of spots > in the compiler assume there is just a single error_mark_node and compare > it using pointer comparison, rather than checking for TREE_CODE () == > ERROR_MA

[C++ PATCH] Fix error-recovery for invalid enumerators (PR c++/79896)

2017-03-07 Thread Jakub Jelinek
Hi! Doing copy_node on error_mark_node doesn't work too well, lots of spots in the compiler assume there is just a single error_mark_node and compare it using pointer comparison, rather than checking for TREE_CODE () == ERROR_MARK. The testcase ICEs in particular during gimplification, the CONST_