This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/5026] __attribute__ ((unused) seems misdocumented
- From: "msp at nortelnetworks dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Feb 2004 14:35:38 -0000
- Subject: [Bug c++/5026] __attribute__ ((unused) seems misdocumented
- References: <20011205204601.5026.bh@techhouse.brown.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From msp at nortelnetworks dot com 2004-02-24 14:35 -------
Subject: Re: __attribute__ ((unused) seems misdocumented
Does that mean that there is no alternative way of tell gcc, in c++ mode,
that the label might not be used?
If so, I will raise a bug/enhancement request against bison suggesting
they change their usage to be #ifndef __cplusplus or something.
Cheers
Mark
On Tue, 24 Feb 2004, bangerth at dealii dot org wrote:
>
> ------- Additional Comments From bangerth at dealii dot org 2004-02-24 14:21 -------
> The reason why it is not allowed in C++ on labels has been stated
> several times: in C++, a variable declaration can follow a label,
> so the attribute that you want to attach to the label really goes
> to the next statement; gcc expects it to be a declaration, and
> complains if it can't find one.
>
> W.
>
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5026