r183722 - Implement DR85: Redeclaration of member is forbidden

Kim Gräsman kim.grasman at gmail.com
Wed Jul 3 13:35:35 PDT 2013

On Wednesday, July 3, 2013, Richard Smith wrote:

> On Wed, Jul 3, 2013 at 12:59 PM, Kim Gräsman <kim.grasman at gmail.com<javascript:;>>
> wrote:
> > 1) Is -Wgnu really the right warning group for this? I'm not up to
> > speed on what -Wgnu means, is it to warn that this is a GNU extension?
> Yes, that's what -Wgnu means.

OK, thanks.

> > 2) Should this warning be active for -std=c++98 or only -std=c++11? I
> > get the diagnostic in both modes.
> It should be active in both modes. This code has never been valid.

That's exactly the kind of motivation I was looking for. If the code is
undeniably invalid, we might want to reconsider handling these duplicates
at all.

> 3) Other compilers (GCC, MSVC) seem to accept it, so I think I want to
> > keep our current behavior until this is considered illegal by
> > everyone. Is my best bet just to disable the warning to let Clang Sema
> > accept this?
> Sure. If you want to disable just this one warning but keep the rest
> of -Wgnu enabled, please provide a patch adding a separate warning
> flag for this one warning (as a member of the -Wgnu group).

Excellent, I was looking for something more fine-grained. I'll see what I
can do.

Thank you,
- Kim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130703/4cc9e4f6/attachment.html>

More information about the cfe-commits mailing list