From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Buck To: doko@cs.tu-berlin.de (Matthias Klose) Cc: gcc@gcc.gnu.org, 45440@bugs.debian.org, rjk@sfere.greenend.org.uk Subject: Re: __attribute__((unused)) is ignored in C++ Date: Tue, 30 Nov 1999 23:37:00 -0000 Message-ID: <199911051655.IAA29834@atrus.synopsys.com> References: <14370.57368.548466.981327@bolero> X-SW-Source: 1999-11n/msg00136.html Message-ID: <19991130233700.7noFdyLBU7adQ3cQpNOnpJTxOr7aZlPYFPXfawT83o8@z> > [This bug was reported to the Debian bug tracking system. Please CC > to 45440@bugs.debian.org.] > > Tested with gcc-2.95.2 > > egcs ignores the __attribute__ syntax to mark a function parameter > unused, and then complains when it is not used. This only happens > when compiling C++, not C. While this should be fixed, it tends to get low priority because there is a standard, portable way in C++ to indicate that a variable is not used: int foo2(int) { return 1; } If you want to give the argument a name for documentation purposes, the style I use is int foo2(int /* x */) { return 1; }