r184068 - Add warning group -Wdeprecated-register for C++11 warning on 'register' being

Richard Smith richard at metafoo.co.uk
Mon Jun 17 14:04:18 PDT 2013


On Mon, Jun 17, 2013 at 1:58 PM, Stephen Kelly <steveire at gmail.com> wrote:
> Jordan Rose wrote:
>
>>
>> On Jun 16, 2013, at 17:01 , Richard Smith
>> <richard-llvm at metafoo.co.uk> wrote:
>>
>>> +// FIXME: Why are DeprecatedImplementations and DeprecatedWritableStr
>>> +// not in this group?
>>> +def Deprecated : DiagGroup<"deprecated", [DeprecatedDeclarations,
>>> +                                          DeprecatedRegister]>,
>>
>> As I understand it, because -Wdeprecated is for user deprecations (i.e.
>> __attribute__((deprecated))), not language deprecations. Unless it's for
>> GCC compatibility, I actually think it should stay that way, and that you
>> should create a new flag for all these new things we're adding (starting
>> with warn_increment_bool).
>
> I made a similar point in the bug report, but it was never addressed:
>
>  http://llvm.org/bugs/show_bug.cgi?id=16336#c1
>
> What does GCC do here?

GCC uses -Wdeprecated-declarations for __attribute__((deprecated)),
and uses -Wdeprecated for deprecated language features (or at least
for access declarations). It does not treat -Wdeprecated-declarations
as a subgroup of -Wdeprecated.

How about: we move the three separate -Wdeprecated-* warnings into
-Wdeprecated, move the two ??? warnings into -Wdeprecated, rename
-Wdeprecated-declarations to -Wdeprecated-attribute (with a
compatibility synonym to -Wdeprecated-declarations), and remove it
from the -Wdeprecated group.



More information about the cfe-commits mailing list