commit | 3da2db468d9a694535d62e7b96a010ce95c26fb6 | [log] [tgz] |
---|---|---|
author | Chris Lattner <sabre@nondot.org> | Mon Oct 29 04:26:44 2007 +0000 |
committer | Chris Lattner <sabre@nondot.org> | Mon Oct 29 04:26:44 2007 +0000 |
tree | ced9385fb3aaaf2360531719c845ec3579ca3fe8 | |
parent | 52735a0339dd31750251a13aac73677693410c9d [diff] [blame] |
casting to void is ok for structs (C99 6.5.4p2), this fixes one bogus error on PR1750. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43436 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/cast.c b/test/Sema/cast.c new file mode 100644 index 0000000..14bfe13 --- /dev/null +++ b/test/Sema/cast.c
@@ -0,0 +1,8 @@ +// RUN: clang -fsyntax-only %s -verify + +typedef struct { unsigned long bits[(((1) + (64) - 1) / (64))]; } cpumask_t; +cpumask_t x; +void foo() { + (void)x; +} +