[C/C++ PATCH] Implement -Wshift-overflow (PR c++/55095) (take 3)

Marek Polacek polacek@redhat.com
Wed Jul 22 12:51:00 GMT 2015


On Wed, Jul 22, 2015 at 08:35:12AM -0400, David Edelsohn wrote:
> On Tue, Jul 21, 2015 at 5:59 AM, Marek Polacek <polacek@redhat.com> wrote:
> > On Mon, Jul 20, 2015 at 04:23:08PM -0400, David Edelsohn wrote:
> >> This seems to have caused a number of new failures in the PPC
> >> testsuite for vmx/unpack.
> >
> > Sorry about that.  Should be fixed with this patch I'm about to commit.
> >
> > 2015-07-21  Marek Polacek  <polacek@redhat.com>
> >
> >         * gcc.dg/vmx/unpack-be-order.c: Use -Wno-shift-overflow.
> >         * gcc.dg/vmx/unpack.c: Likewise.
> 
> This doesn't fully fix the failures.
 
Ouch.  What other failures do you see?  I've tried the patch on ppc64-linux
and didn't see any others.

It'd be very weird to see -Wshift-overflow warnings when -Wno-shift-overflow
is in effect.

> > --- gcc/testsuite/gcc.dg/vmx/unpack.c
> > +++ gcc/testsuite/gcc.dg/vmx/unpack.c
> > @@ -1,3 +1,5 @@
> > +/* { dg-options "-Wno-shift-overflow" } */
> > +
> 
> Should this be dg-additional-options ?

I did what was in gcc.dg/vmx/unpack-be-order.c, i.e. dg-options.  Or does
using dg-additional-options help?

	Marek



More information about the Gcc-patches mailing list