Message ID | 20140727110235.GO30336@redhat.com |
---|---|
State | New |
Headers | show |
On Sun, Jul 27, 2014 at 1:02 PM, Marek Polacek <polacek@redhat.com> wrote: > Wodr in common.opt was missing a Var, which means: > 1) we ICE with -Wodr, since -Wodr isn't handled in opts.c; > 2) -Wno-odr wouldn't work. > Thus fixed. I'd think this doesn't need a testcase... > > Bootstrapped/regtested on x86_64-linux, ok for trunk? Ok. Does this mean we don't have a -Wodr testcase? Thanks, Richard. > 2014-07-27 Marek Polacek <polacek@redhat.com> > > PR middle-end/61913 > * common.opt (Wodr): Add Var. > > diff --git gcc/common.opt gcc/common.opt > index a385ee0..3b04044 100644 > --- gcc/common.opt > +++ gcc/common.opt > @@ -588,7 +588,7 @@ Wmissing-noreturn > Common Alias(Wsuggest-attribute=noreturn) > > Wodr > -Common Warning > +Common Var(warn_odr_violations) Warning > Warn about some C++ One Definition Rule violations during link time optimization > > Woverflow > > Marek
> On Sun, Jul 27, 2014 at 1:02 PM, Marek Polacek <polacek@redhat.com> wrote: > > Wodr in common.opt was missing a Var, which means: > > 1) we ICE with -Wodr, since -Wodr isn't handled in opts.c; > > 2) -Wno-odr wouldn't work. > > Thus fixed. I'd think this doesn't need a testcase... > > > > Bootstrapped/regtested on x86_64-linux, ok for trunk? > > Ok. Does this mean we don't have a -Wodr testcase? We ICE at -Wno-odr (thanks for fixing it! I was somewhat puzzled by fact that I need to declare var that is not needed at all). But there is no -Wodr testcase as I do not know how to match warnings at LTO time. If there is a way, I will add one. Honza > > Thanks, > Richard. > > > 2014-07-27 Marek Polacek <polacek@redhat.com> > > > > PR middle-end/61913 > > * common.opt (Wodr): Add Var. > > > > diff --git gcc/common.opt gcc/common.opt > > index a385ee0..3b04044 100644 > > --- gcc/common.opt > > +++ gcc/common.opt > > @@ -588,7 +588,7 @@ Wmissing-noreturn > > Common Alias(Wsuggest-attribute=noreturn) > > > > Wodr > > -Common Warning > > +Common Var(warn_odr_violations) Warning > > Warn about some C++ One Definition Rule violations during link time optimization > > > > Woverflow > > > > Marek
On Mon, Jul 28, 2014 at 10:23:36AM +0200, Jan Hubicka wrote: > > On Sun, Jul 27, 2014 at 1:02 PM, Marek Polacek <polacek@redhat.com> wrote: > > > Wodr in common.opt was missing a Var, which means: > > > 1) we ICE with -Wodr, since -Wodr isn't handled in opts.c; > > > 2) -Wno-odr wouldn't work. > > > Thus fixed. I'd think this doesn't need a testcase... > > > > > > Bootstrapped/regtested on x86_64-linux, ok for trunk? > > > > Ok. Does this mean we don't have a -Wodr testcase? > > We ICE at -Wno-odr (thanks for fixing it! I was somewhat puzzled by fact > that I need to declare var that is not needed at all). > > But there is no -Wodr testcase as I do not know how to match warnings at LTO > time. If there is a way, I will add one. Heh, I was just trying to create some testcase for -Wodr, but failed. pr60720_0.c testcase says: /* ??? lto.exp does not allow to scan for :1:12: warning: type of 'x' does not match original declaration extern int x[]; ^ :1:5: note: previously declared here int x; ^ */ Bummer :(. Marek
diff --git gcc/common.opt gcc/common.opt index a385ee0..3b04044 100644 --- gcc/common.opt +++ gcc/common.opt @@ -588,7 +588,7 @@ Wmissing-noreturn Common Alias(Wsuggest-attribute=noreturn) Wodr -Common Warning +Common Var(warn_odr_violations) Warning Warn about some C++ One Definition Rule violations during link time optimization Woverflow