diff options
author | Steve Naroff <snaroff@apple.com> | 2008-05-12 21:44:38 +0000 |
---|---|---|
committer | Steve Naroff <snaroff@apple.com> | 2008-05-12 21:44:38 +0000 |
commit | e701c0a953d05c3403a74fdb449a8f4a1e4e6594 (patch) | |
tree | e6072c7504b7c36be985527dfed88cab1d3d6b95 /test/Sema/conditional-expr.c | |
parent | a989def422d0dc8a13c705766202ee738fce237a (diff) |
Fix <rdar://problem/5928590> clang -fsyntax-only: "incompatible operand types ('int' and 'void')" on input that 'gcc -fsyntax-only' eats
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51002 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/conditional-expr.c')
-rw-r--r-- | test/Sema/conditional-expr.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Sema/conditional-expr.c b/test/Sema/conditional-expr.c index a21914c6d5..ae973d6b2b 100644 --- a/test/Sema/conditional-expr.c +++ b/test/Sema/conditional-expr.c @@ -36,3 +36,7 @@ void foo() { *(0 ? (asdf) 0 : &x) = 10; } +int Postgresql() { + char x; + return ((((&x) != ((void *) 0)) ? (*(&x) = ((char) 1)) : (void) ((void *) 0)), (unsigned long) ((void *) 0)); // expected-warning {{C99 forbids conditional expressions with only one void side}} +} |