This is the mail archive of the 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: ICE in change_address at emit_rtl.c

Gabriel Dos Reis wrote:-

> Neil Booth <> writes:
> [...]
> | I've not been able to find a satisfactory fix; since I'm not a fan of
> | error_mark_node-s I don't want to introduce yet more checks for them.
> | I hate the error_mark_node stuff; it would be nice if it could go
> | away.
> What should be the alternative?

Generate something that is valid, even if it's not what the user
specified.  e.g. if it's an invalid typedef, typedef it to int (or
something more intelligent if possible) rather than error_mark_node.
Or don't enter it in the symbol table at all.  The problem with
error_mark_node is that it's too easy to forget to check for them, and
that it's not documented where they can and can't appear.  Some
routines do check, some don't.  If I write a new routine, how can I be
sure?  You end up checking all the time, redundantly, which pessimizes
and obfuscates the code.

I can only see one good thing they help with: suppression of cascading
errors.  I can't believe it's too hard to find another way of solving
that.  It's not as if it's fully solved anyway; the existing C parser
often leads to cascading errors.


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