[llvm-bugs] [Bug 38351] New: some incompatible declarations not diagnosed
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Jul 28 23:09:10 PDT 2018
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: unassignedclangbugs at nondot.org
Reporter: zhonghao at pku.org.cn
CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180729/4f777bbd/attachment.html>
More information about the llvm-bugs
mailing list