GCC gives a warning for this program:
test.cpp: In function 'int main()':
test.cpp:3:9: warning: unused variable 'x' [-Wunused-variable]
If I add an "unused" attribute with the GNU syntax:
int x __attribute__((unused));
the warning goes away.
However, if I use the C++11 syntax:
int x [[unused]];
the warning remains, and I also get:
test.cpp:3:20: warning: 'unused' attribute directive ignored [-Wattributes]
Does anyone know about gcc plans to support the attributes with C++11 syntax.