This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why does G++ not accept the unused attribute on labels ?


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]