This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Document arithmetic overflow semantics
- From: dewar at gnat dot com (Robert Dewar)
- To: dewar at gnat dot com, segher at koffie dot nl
- Cc: bosch at gnat dot com, gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org,kenner at vlsi1 dot ultra dot nyu dot edu
- Date: Sun, 16 Feb 2003 07:41:40 -0500 (EST)
- Subject: 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.