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: [C++ PATCH] Fix ice-on-invalid calling get_unwidened (error_mark_node, ) (PR c++/32567)


Jakub Jelinek wrote:

> 2007-08-21  Jakub Jelinek  <jakub@redhat.com>
> 
> 	PR c++/32567
> 	* typeck.c (build_unary_op) <case PREINCREMENT_EXPR>: Return
> 	error_mark_node right away if build_expr_type_conversion
> 	returned it.

This is OK.

FWIW, I'd actually do it the opposite way of what you suggested.  For
routines that are part of the middle-end API designed to be used by the
front end, accepting error_mark_nodes as inputs means that we don't have
to remember to check as many places in the front ends.  By being
generous in what we accept in the middle end, we'd make the compiler
more robust, at the expense of doing a bit of extra checking.

But, I'm happy to have the bug fixed, and it's not worth arguing about.

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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