This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Implement -Wduplicated-branches (PR c/64279)


On Thu, 2016-10-20 at 16:24 +0200, Marek Polacek wrote:
> On Thu, Oct 20, 2016 at 10:11:55AM -0400, Jason Merrill wrote:
> > On Wed, Oct 19, 2016 at 7:07 AM, Marek Polacek <polacek@redhat.com>
> > wrote:
> > > But since integer csts and various decls
> > > don't carry location info, this works only partially, so the
> > > warning
> > > warns even for e.g.
> > > 
> > >   if (TREE_STATIC (node) || DECL_EXTERNAL (node))
> > >     max_align = MAX_OFILE_ALIGNMENT;
> > >   else
> > >     max_align = MAX_STACK_ALIGNMENT;
> > > 
> > > when MAX_OFILE_ALIGNMENT and MAX_STACK_ALIGNMENT represent the
> > > same number.
> > > There's no way to get around this, so the warning isn't enabled
> > > by nor
> > > -Wall neither -Wextra, and can't be until we solve the pesky
> > > location
> > > horror.  (-Wduplicated-cond is off for the very same reason.)
> > 
> > Is someone working on this?
> 
> Not me, but I think David has been experimenting with this.  David,
> is that
> correct?

I started looking at this, but it's unlikely that I'll have something
ready for gcc 7 (have been focusing on the RTL frontend).




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]