This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c/8506: 3.3 (1104) disallowing omission of parameters in fn def
- From: jdonner0 at earthlink dot net
- To: gcc-gnats at gcc dot gnu dot org
- Date: 8 Nov 2002 17:52:24 -0000
- Subject: c/8506: 3.3 (1104) disallowing omission of parameters in fn def
- Reply-to: jdonner0 at earthlink dot net
>Number: 8506
>Category: c
>Synopsis: 3.3 (1104) disallowing omission of parameters in fn def
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Fri Nov 08 09:56:04 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Jeff Donner
>Release: gcc version 3.3 20021104 (experimental)
>Organization:
>Environment:
cygwin, Win2K
>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
I'm not a language lawyer but I know there's scads of code
that uses this as a clean way to show a fn doesn't
actually use its parameters. And I believe it's correct
usage, many other compilers (VC, Borland at least) allow it.
This would break a lot of code. This shouldn't even be
a warning unless it is specifically asked for.
>How-To-Repeat:
gcc foo.c
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="foo.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="foo.c"
aW50IGZvbyhpbnQpe30NCg==