https://bugs.llvm.org/show_bug.cgi?id=38351
Bug ID: 38351
Summary: some incompatible declarations not diagnosed
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: zhong...@pku.org.cn
CC: llvm-bugs@lists.llvm.org
The code is as follow:
int f(int (*)[]);
int g() { int f(int (*)[2]); }
int f(int (*)[3]);
clang accepts the code, but gcc rejects it:
gcc code0.c
code0.c:3:5: error: conflicting types for 'f'
int f(int (*)[3]);
^
code0.c:2:15: note: previous declaration of 'f' was here
int g() { int f(int (*)[2]); }
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs