Better sequence point warnings

Bernd Schmidt bernds@redhat.co.uk
Mon Oct 16 07:46:00 GMT 2000


On Mon, 16 Oct 2000, Joseph S. Myers wrote:

> On Mon, 16 Oct 2000, Bernd Schmidt wrote:
> 
> > This one is a reimplementation which should fix these problems.  I know of
> > no cases where this current algorithm generates false positives, with one
> > exception: in one of the testcases in sequence-pt-1.c, constant folding
> > removes a sequence point and this leads to a warning.  This is a bug in
> > fold-const.c AFAICT, so I've removed the xfail.
> 
> With the code moved to c-common.c, you should also add support for the C++
> compiler to parse the option and remove the note in invoke.texi about the
> current implementation only working for C.

I'd prefer to do that separately.  I have a feeling there'll be more different
tree codes to take into account when dealing with C++.

> Will this go down into sizeof expressions (following the C99 rules for
> when what's inside sizeof is evaluated in the presence of VLAs)?

I have no idea.  I suppose it might, and that may even be a bug for C89.


Bernd



More information about the Gcc-patches mailing list