c/8506: 3.3 (1104) disallowing omission of parameters in fn def

Christian Ehrhardt ehrhardt@mathematik.uni-ulm.de
Fri Nov 8 10:36:00 GMT 2002


The following reply was made to PR c/8506; it has been noted by GNATS.

From: "Christian Ehrhardt" <ehrhardt@mathematik.uni-ulm.de>
To: jdonner0@earthlink.net
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c/8506: 3.3 (1104) disallowing omission of parameters in fn def
Date: Fri, 8 Nov 2002 19:35:28 +0100

 On Fri, Nov 08, 2002 at 05:52:24PM -0000, jdonner0@earthlink.net wrote:
 > gcc now makes it an error to omit parameter names, eg
 > 
 > int foo(int /* note, omitted parameter name*/){}
 > now gives an error.
 > 
 > $ gcc foo.c
 > foo.c: In function `foo':
 > foo.c:1: error: parameter name omitted
 
 This behaviour seems to be mandated by the standard. 6.9.1[#5] states:
    If the declarator includes a parameter type list, the declaration of
    each parameter shall include an identifier, except for the special case
    of a parameter list consisting of a single parameter of type void, in
    which case there shall not be an identifier. No declaration list shall
    follow.
 
    regards   Christian
 
 -- 
 THAT'S ALL FOLKS!



More information about the Gcc-prs mailing list