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: [PATCH] Fix PR c++/42054: ICE with invalid template parameter


Ping? (http://gcc.gnu.org/ml/gcc-patches/2009-11/msg01595.html)

Thanks,
  Simon

On 11/28/09 5:18 PM, Simon Martin wrote:
Hello Gabriel,

- if (tmpl_default != NULL_TREE && parm_default != NULL_TREE)
+ if (tmpl_parm != error_mark_node
+ && tmpl_default != NULL_TREE && parm_default != NULL_TREE)

Instead of adding one layer of more predicates (that get repeated, at the risk of forgetting to check), why don't you just do an early return when tmpl_parm is an error_mark_node?
You're right, thanks for your remark.

The attached patch does that. I have successfully regtested it on
86_64-apple-darwin-9. Is it OK for trunk?

Best regards,
Simon



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