[cfe-commits] r158411 - in /cfe/trunk: lib/Sema/SemaDeclAttr.cpp lib/Sema/SemaDeclCXX.cpp test/SemaCXX/warn-unused-member.cpp

Jonathan Sauer jonathan.sauer at gmx.de
Wed Jun 13 12:21:16 PDT 2012


Hello,

>> Allow __attribute__((unused)) for fields and make it silence
>> -Wunused-private-field.
> 
> So that these annotations don't get out of date, should we warn when a
> field is marked unused but is, in fact, used? (so that when it becomes
> used the attribute is cleaned up and doesn't lead to the function
> being accidentally unused again in the future)

There already is a warning for this, -Wused-but-marked-unused, which is emitted
when a function marked unused is being used. I think it should be the same with
fields.


Jonathan





More information about the cfe-commits mailing list