public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: jdonner0@earthlink.net
To: gcc-gnats@gcc.gnu.org
Subject: c/8506: 3.3 (1104) disallowing omission of parameters in fn def
Date: Fri, 08 Nov 2002 09:56:00 -0000	[thread overview]
Message-ID: <20021108175224.25503.qmail@sources.redhat.com> (raw)


>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==


             reply	other threads:[~2002-11-08 17:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-08  9:56 jdonner0 [this message]
2002-11-08 10:06 Phil Edwards
2002-11-08 10:16 Richard Earnshaw
2002-11-08 10:36 Christian Ehrhardt
2002-11-08 11:59 pme

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021108175224.25503.qmail@sources.redhat.com \
    --to=jdonner0@earthlink.net \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).