GCC 3.3 release criteria
Joseph S. Myers
jsm28@cam.ac.uk
Tue Feb 25 18:48:00 GMT 2003
On Tue, 25 Feb 2003, Richard Earnshaw wrote:
> > There are a lot of ill-formed (note I don't use other terms like
> > undefined) programs for which it is impossible to emit a diagnostic. The
> > following, for example is ill-formed, though each statement is
> > well-defined.
> >
> > int x;
> > int plus_x() { x+=1; return x;}
> > int get_x() {return x;}
> > extern int f(int, int);
> > int g()
> > { return g(plus_x(), get_x();}
>
> Err, before the pedants start, that last line should read:
>
> {return f(plus_x(), get_x());}
What is meant to be wrong with this code? There isn't a sequence point
problem: function calls do not overlap (DR#087; C++ states this
explicitly).
--
Joseph S. Myers
jsm28@cam.ac.uk
More information about the Gcc
mailing list