This is the mail archive of the gcc@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: gcc 4.2 more strict check for "function called through a non-compatible type"


> I apologize for presenting something which appears to be a strawman
> argument.  That would never be my intent.  Let me restate: I don't
> think gcc should ever insert a trap call for undefined code.  We
> should only insert a trap call for code which will provably trap.
>
> We're currently breaking an existing free software program which
> formerly worked although it relied on undefined behaviour.  Therefore,
> I think that changing this would not be a complete waste of time.
> Obviously I would never ask anybody else to work on it.
>
> I personally don't agree that this needs to be a documented extension.
> I'm simply going on a more general rule which I tried to state above:
> I don't think we should insert a trap call for undefined code.
>
> Ian
>   

Exactly as I think.
What do we do if compiler ICE generating code for valid C syntax with
defined behavior? Fix it!
Why should we go another way for valid C syntax with undefined  behavior?
I was really surprised going deep in that issue.
Its no excuse that generated code will have platform-depend semantic,
natural way is just fix the ICE and does not cover with a trap.


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