c/8506: 3.3 (1104) disallowing omission of parameters in fn def
Phil Edwards
phil@jaj.com
Fri Nov 8 10:06:00 GMT 2002
The following reply was made to PR c/8506; it has been noted by GNATS.
From: Phil Edwards <phil@jaj.com>
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 13:02:33 -0500
On Fri, Nov 08, 2002 at 05:52:24PM -0000, jdonner0@earthlink.net wrote:
> >Description:
> 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
It's correct C++, but I don't believe it's correct C. Try renaming the
file and running "gcc -c foo.cc" (or .cpp or whatever) instead.
You can always omit the names in declarations, of course, but not
definitions.
Phil
--
I would therefore like to posit that computing's central challenge, viz. "How
not to make a mess of it," has /not/ been met.
- Edsger Dijkstra, 1930-2002
More information about the Gcc-prs
mailing list