public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: kronos@darkstar.net To: gcc-gnats@gcc.gnu.org Subject: c/6326: non prototype-format parameter type declarators Date: Tue, 16 Apr 2002 08:26:00 -0000 [thread overview] Message-ID: <20020416151531.D39152AB8@dreamland.darkstar.net> (raw) >Number: 6326 >Category: c >Synopsis: gcc compile illegal code >Confidential: no >Severity: non-critical >Priority: low >Responsible: unassigned >State: open >Class: accepts-illegal >Submitter-Id: net >Arrival-Date: Tue Apr 16 08:26:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: >Release: 3.0.4 >Organization: >Environment: System: Linux dreamland 2.4.18-xfs #2 Mon Mar 4 17:42:57 CET 2002 i586 unknown Architecture: i586 host: i586-pc-linux-gnu build: i586-pc-linux-gnu target: i586-pc-linux-gnu configured with: ../gcc/configure --prefix=/usr --with-slibdir=/lib --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --with-cpu=k6 --enable-threads : (reconfigured) >Description: Quoting from ISO C99: 6.7.5.3 Function declarators (including prototypes) [...] 14 An identifier list declares only the identifiers of the parameters of the function. An empty list in a function declarator that is part of a definition of that function specifies that the function has no parameters. The empty list in a function declarator that is not part of a definition of that function specifies that no information about the number or types of the parameters is supplied. I think that int foo() { return 0; } should be equal to int foo(void) { return 0; } gcc do not complain when I pass one or more paramters to this function. The code (see below) was compiled with: gcc -Wall -std=c99 -op p.c >How-To-Repeat: int foo() { return 0; } int main(void) { foo("bar"); foo(1, 2, 3); foo(3.14); } >Fix: >Release-Note: >Audit-Trail: >Unformatted:
reply other threads:[~2002-04-16 15:26 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20020416151531.D39152AB8@dreamland.darkstar.net \ --to=kronos@darkstar.net \ --cc=act.kronoz@activenetwork.it \ --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: linkBe 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).