This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Why does G++ not accept the unused attribute on labels ?
- From: Nathan Sidwell <nathan at codesourcery dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 20 Aug 2003 20:16:10 +0100
- Subject: Re: Why does G++ not accept the unused attribute on labels ?
- Organization: Codesourcery LLC
- References: <m33cfwtdk7.fsf@redhat.com>
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