From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29299 invoked by alias); 31 Aug 2004 03:22:52 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 29283 invoked from network); 31 Aug 2004 03:22:51 -0000 Received: from unknown (HELO mproxy.gmail.com) (64.233.170.194) by sourceware.org with SMTP; 31 Aug 2004 03:22:51 -0000 Received: by mproxy.gmail.com with SMTP id 75so117324rnl for ; Mon, 30 Aug 2004 20:22:51 -0700 (PDT) Received: by 10.38.3.58 with SMTP id 58mr858925rnc; Mon, 30 Aug 2004 20:22:51 -0700 (PDT) Received: by 10.38.22.35 with HTTP; Mon, 30 Aug 2004 20:22:51 -0700 (PDT) Message-ID: <3aa41a650408302022774d7486@mail.gmail.com> Date: Tue, 31 Aug 2004 03:58:00 -0000 From: Oza Dhairesh Reply-To: Oza Dhairesh To: gcc-help@gcc.gnu.org Subject: function calls before variable declarations does not give error in gcc? Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2004-08/txt/msg00290.txt.bz2 Hi, The following code does not give an error wth gcc void fun(int a){ printf("there u go %d\n",a);} int main() { char abc[10] = "the"; int a1 = 10; fun(10); int a = 1; } gcc --version gave the following o/p: gcc (GCC) 3.3.1 (SuSE Linux) Copyright (C) 2003 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. while wth a compiler that gave the following o/p wth gcc --version 2.96 I got the following error: test1.c: In function `main': test1.c:10: parse error before `int' why this difference?