int i;
void
f1 ()
{
const int * __attribute__((unused)) a = &i;
const int *b __attribute__((unused)) = &i;
}
warns for a (incorrectly) and not for b in C++, in C it correctly doesn't warn
at all.
--
Summary: [4.6 Regression] -Wunused-but-set-variable problem with
unused attribute on type
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jakub at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44443