From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4531 invoked by alias); 16 Apr 2002 15:26:04 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 4505 invoked by uid 71); 16 Apr 2002 15:26:02 -0000 Resent-Date: 16 Apr 2002 15:26:02 -0000 Resent-Message-ID: <20020416152602.4503.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, act.kronoz@activenetwork.it Received:(qmail 663 invoked from network); 16 Apr 2002 15:16:27 -0000 Received: from unknown (HELO dreamland.darkstar.net) (62.94.109.204) by sources.redhat.com with SMTP; 16 Apr 2002 15:16:27 -0000 Received: by dreamland.darkstar.net (Postfix, from userid 1000) id D39152AB8; Tue, 16 Apr 2002 17:15:31 +0200 (CEST) Message-Id:<20020416151531.D39152AB8@dreamland.darkstar.net> Date: Tue, 16 Apr 2002 08:26:00 -0000 From: kronos@darkstar.net Reply-To: act.kronoz@activenetwork.it To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version:3.113 Subject: c/6326: non prototype-format parameter type declarators X-SW-Source: 2002-04/txt/msg00838.txt.bz2 List-Id: >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: