http://llvm.org/bugs/show_bug.cgi?id=3441
Summary: mixing ANSI C declaration and K&R function is sometimes
allowed and sometimes not
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Semantic Analyzer
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected]
sometimes it works, sometimes it doesnt:
lev /tmp$ cat y.c
static int i(int, int);
static int i(j, k)
int j;
int k;
{
return 0;
}
lev /tmp$ ccc y.c
/usr/lib/crt1.o(.text+0x8a): In function `_start':
: undefined reference to `main'
lev /tmp$ cat yy.c
static int i(int, int, char);
static int i(j, k, l)
int j;
int k;
char l;
{
return 0;
}
lev /tmp$ ccc yy.c
yy.c:3:12: error: conflicting types for 'i'
static int i(j, k, l)
^
yy.c:1:12: note: previous declaration is here
static int i(int, int, char);
^
2 diagnostics generated.
lev /tmp$
there are similar bugs #2412 and #2821, dont know if it's related but it looks
like it is
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs