Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!deimos.cis.ksu.edu!unmvax!ncar!boulder!stan!reb From: reb@Solbourne.COM (Roy Binz) Newsgroups: comp.lang.c++ Subject: Omitted identifiers for unused parameters? Message-ID: <1304@stan.Solbourne.COM> Date: 31 May 89 22:51:58 GMT Distribution: usa Organization: Solbourne Computer Inc., Longmont, Co. Lines: 25 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?