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: [PATCH] Document arithmetic overflow semantics


> Yes, but won't such a program always give a compile-time
> warning like "this branch will never be executed" or
> "unreachable code deleted"?  Can you give an example
> where the compiler will delete a branch but where it
> is not able to diagnose it did?


Actually it is often very difficult to track down actions in a complex
optimization circuit that is manipulating some intermediate form to give
clear diagnostics, because the sequence of logic that arrives at a decision
may be arbitrarily complex, and it may be difficult for instance o tell
if the code in question is a direct consequence of the original source
code, or some code generated by some other optimization. Certainly there
is no requirement for a compiler to give such warnings.


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