[cfe-commits] r117184 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaAttr.cpp lib/Sema/SemaExpr.cpp test/Analysis/rdar-6442306-1.m test/Sema/attr-unused.c test/Sema/pragma-unused.c
andersca at mac.com
Sat Oct 23 21:29:53 PDT 2010
Oct 23, 2010 kl. 9:11 PM skrev John McCall:
> On Oct 22, 2010, at 4:37 PM, Anders Carlsson wrote:
>> Author: andersca
>> Date: Fri Oct 22 18:37:08 2010
>> New Revision: 117184
>> URL: http://llvm.org/viewvc/llvm-project?rev=117184&view=rev
>> Warn if a variable marked with the "unused" attribute is used. Patch by Darin Adler!
> Er. Traditionally this attribute is put on declarations to white-list them for -Wunused; i.e. to say that it's okay if they aren't used, not to say that it's not okay if they are used. This breaks a *lot* of expected, perfectly idiomatic uses of __attribute__((unused)). Furthermore, AFAICT __attribute__((unavailable)) already captures the desired semantics, at least for (ahem) projects that always build with -Werror.
> Please revert this or at least take it out of -Wunused.
Done in r117219.
More information about the cfe-commits