This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
C++: Unused parameter even when unnamed
- To: gcc-bugs at gcc dot gnu dot org
- Subject: C++: Unused parameter even when unnamed
- From: Chip Salzenberg <chip at valinux dot com>
- Date: Fri, 9 Jun 2000 15:46:22 -0700
Given this:
void foo(int x);
void foo(int) {}
G++ complains that "x" is unused. But the whole point of not giving
the parameter a name in the definition is to tell the compiler that
it's not supposed to be used.
Surely giving parameters names in prototypes isn't supposed to be a
Bad Idea?
--
Chip Salzenberg - a.k.a. - <chip@valinux.com>
"I wanted to play hopscotch with the impenetrable mystery of existence,
but he stepped in a wormhole and had to go in early." // MST3K