On Mon, 3 Aug 1998, Rodent of Unusual Size wrote:
> Dirk-Willem van Gulik wrote:
> >
> > I believe that according to the ANSI standard (page 91)
> > if I read it correctly a compiler _may_
> >
> > char foo[] = "hello";
> > char some[] = "one";
> > char bar[] = "hello";
> >
> > end up having foo == bar. Or even if you are unlucky
> >
> > char foo[] = "hello world";
> > char bar[] = "world";
> >
> > can lead to foo+6 == bar.
> Oh sigh. Hmm. If this is due to string constant folding, does
> changing the compiler optimisation have any effect?
On the acorn compiler I was working on at that time (getting the berkely
C++ front end to produce decent C which was easily optimizable to ARM/
RISC code) there was no way of avoiding it.
But looking at the piece of code in question; this could not really happen
unless there is a conceptual bug in apache. Hmm. Weird.
Dw.
|