This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Is this meant to compile?
- From: Chris Lattner <sabre at nondot dot org>
- To: gcc at gcc dot gnu dot org
- Date: Wed, 20 Aug 2003 13:54:13 -0500 (CDT)
- Subject: Is this meant to compile?
This testcase:
-------------------------
static int foo(int);
static int foo(C)
char C;
{ return C; }
void test() { foo(7); }
------------------
Currently compiles with mainline gcc, yet this testcase:
------------------
static int foo(int);
static int foo(char C) { return C; }
void test() { foo(7); }
------------------
Produces these errors:
2003-08-20-PrototypeMismatch.c:7: error: conflicting types for 'foo'
2003-08-20-PrototypeMismatch.c:3: error: previous declaration of 'foo'
Is this desired behavior?
-Chris
--
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/