This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Need help ... related to gcc v 4.1.1
- From: "Avinesh Kumar" <avinesh at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 5 Apr 2007 11:52:38 +0530
- Subject: Need help ... related to gcc v 4.1.1
Hi,
I am facing problem in compiling a program with gcc version 4.1.1
#include <stdio.h>
int foo(void);
int main(void)
{
foo();
return(0);
}
static int foo(void)
{
printf("Hello world !!!\n");
return(0);
}
It is giving following errors ...
[avinesh@civic snippets]$ gcc stat.c
stat.c:13: error: static declaration of foo follows non-static declaration
stat.c:3: error: previous declaration of foo was here
The error is right, however gcc version 3.4.3, is letting me compile
it with warnings.
It is difficult for me to correct the code in my entire application
which is quite big, can
you suggest me some gcc option or any other workaround which gets my job done.
That would be of great help to me.
Thanks in advance.
--
Regards,
Avinesh Kumar