[comp.lang.c++] Omitted identifiers for unused parameters?

reb@Solbourne.COM (Roy Binz) (06/01/89)

I have C++ program which has several routines which get dispatched from
a generic handler. The routines each take the same three parameters, but
some of them do not need one or more of the parameters for their operation.

Currently, C++ gives warning message about these parameters being unused
in their respective routines.  Looking in the C++ book in section 8.4
on page 270 the next to last paragraph reads:

    An identifier can optionally be provided as an argument name; if present
    in a function declaration, it cannot be used since it immediately goes
    out of scope; if present in a function definition (section 10) it names
    a formal argument.

My question concerns the legality (and B.S.'s intent!) of the following
procedure definition:

    void func(int one, int /* unused, omitted*/, int three)
    {
	/* body */
    }

This compiles with no errors and produces correct code under both cfront 1.2.1
and G++ 1.34.

Comments from the gurus?