[LLVMbugs] [Bug 3307] New: gcc compat: clang rejects pointer/ int mismatch in conditional expression
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Fri Jan 9 12:54:55 PST 2009
http://llvm.org/bugs/show_bug.cgi?id=3307
Summary: gcc compat: clang rejects pointer/int mismatch in
conditional expression
Product: clang
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Semantic Analyzer
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: daniel at zuster.org
CC: llvmbugs at cs.uiuc.edu
clang rejects the following code which gcc accepts with a warning:-
--
ddunbar at lordcrumb:hard$ cat conditional-compat.c
void f0(int a0, void *a1, int a2) {
a0 ? a1 : a2;
}
ddunbar at lordcrumb:hard$ clang -fsyntax-only conditional-compat.c
conditional-compat.c:2:6: error: incompatible operand types ('void *' and
'int')
a0 ? a1 : a2;
^ ~~ ~~
1 diagnostic generated.
ddunbar at lordcrumb:hard$ gcc -fsyntax-only conditional-compat.c
conditional-compat.c: In function 'f0':
conditional-compat.c:2: warning: pointer/integer type mismatch in conditional
expression
--
--
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.
More information about the llvm-bugs
mailing list