void Variable_Attributes_unused_0()
{
static int aStatic =0;
int aUnused __attribute__ ((unused));
int bUnused;
aStatic++;
}
In this example, the compiler warns that bUnused is declared but never referenced, but does not warn about aUnused.
Note
The GNU compiler does not give any warning.