-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"
Description
Bugzilla Link | 3307 |
Resolution | FIXED |
Resolved on | Mar 12, 2010 00:57 |
Version | unspecified |
OS | All |
Reporter | LLVM Bugzilla Contributor |
CC | @efriedma-quic |
Extended Description
clang rejects the following code which gcc accepts with a warning:-
ddunbar@lordcrumb:hard$ cat conditional-compat.c
void f0(int a0, void *a1, int a2) {
a0 ? a1 : a2;
}
ddunbar@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@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
Metadata
Metadata
Assignees
Labels
bugzillaIssues migrated from bugzillaIssues migrated from bugzillaclang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"