This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: type based aliasing again
- To: mark at codesourcery dot com (Mark Mitchell)
- Subject: Re: type based aliasing again
- From: Joe Buck <jbuck at synopsys dot COM>
- Date: Wed, 8 Sep 99 20:40:41 PDT
- Cc: jbuck at synopsys dot com, gcc at gcc dot gnu dot org, rms at gnu dot org
Mark Mitchell writes:
> There will be cases where A will pessimize code that does not have
> undefined behavior. So, in fact, C is impossible, and A penalizes
> conforming code. Thus, B is the only remaining sensible option.
Your conclusion does not follow from the premise, unless you add
extra assumptions, like "It is not sensible to ever pessimize any
conforming program the least little bit, no matter how rare such
programs might be."
Could you give an example of such a case? It seems that it could
only occur if
1. There is an illegal access, but
2. It can never be reached, but
3. We can't tell that it will never be reached.
If 1 is not true, the issue doesn't arise; if 2 is not true, the program
has undefined behavior; if 3 is not true, we've killed the affected code
in any case.
Do we really care if there is a marginal slowdown of code that satisfies
all three conditions?