Why does G++ not accept the unused attribute on labels ?
Nathan Sidwell
nathan@codesourcery.com
Wed Aug 20 19:16:00 GMT 2003
Nick Clifton wrote:
> Hi Guys,
>
> Why does G++ not accept the unused attribute on labels ?
because the grammar is ambiguous
in c99 you cannot have a labelled declaration statement, in c++ you can.
label: __attribute__((unused)) int i;
which is unused? the label or the variable?
you can say
label __attribute__((unused)):
in both gcc and g++
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
The voices in my head said this was stupid too
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
More information about the Gcc-bugs
mailing list