[patch] Make "C++98 requires an accessible copy constructor" warning DefaultIgnore

Nico Weber thakis at chromium.org
Sat Sep 6 17:02:09 PDT 2014


On Sat, Sep 6, 2014 at 4:38 PM, Richard Smith <richard at metafoo.co.uk> wrote:

> -Wc++98-compat doesn't make sense here: that warning group is for warning
> on code that is valid in the current language but not in C++98.
>

The same is true for warn_cxx98_compat_enumerator_list_comma (which is
in CXX98CompatPedantic) too though, right?


> The right way to make this change would be to downgrade this from ExtWarn
> to Extension.
> On 6 Sep 2014 16:08, "Nico Weber" <thakis at chromium.org> wrote:
>
>> Hi,
>>
>> the attached (tiny) patch changes the ""C++98 requires an accessible copy
>> constructor" warning to be DefaultIgnore, like e.g. "commas at the end of
>> enumerator lists are incompatible with C++98" is. The reasoning is that
>> this construct is accepted by all compilers and valid in C++11, so it
>> doesn't seem like a useful warning to have enabled by default. Building
>> with -pedantic, -Wbind-to-temporary-copy, or -Wc++98-compat still shows the
>> warning.
>>
>> The motivation is that I built re2, and this was the only warning that
>> was emitted during the build. Both changing re2 to fix the warning and
>> detecting clang and suppressing the warning in re2's build seem inferior
>> than just giving the compiler a good default for this warning.
>>
>> Ok?
>>
>> Nico
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140906/b38c347c/attachment.html>


More information about the cfe-commits mailing list