Daniel Dunbar | d7d5f02 | 2009-03-24 02:24:46 +0000 | [diff] [blame] | 1 | // RUN: clang-cc -fsyntax-only %s -verify |
Chris Lattner | 3da2db4 | 2007-10-29 04:26:44 +0000 | [diff] [blame] | 2 | |
| 3 | typedef struct { unsigned long bits[(((1) + (64) - 1) / (64))]; } cpumask_t; |
| 4 | cpumask_t x; |
| 5 | void foo() { |
| 6 | (void)x; |
| 7 | } |
Eli Friedman | 41826bb | 2009-05-01 02:23:58 +0000 | [diff] [blame] | 8 | void bar() { |
| 9 | char* a; |
| 10 | double b; |
| 11 | b = (double)a; // expected-error {{pointer cannot be cast to type}} |
| 12 | a = (char*)b; // expected-error {{cannot be cast to a pointer type}} |
| 13 | } |
Chris Lattner | 3da2db4 | 2007-10-29 04:26:44 +0000 | [diff] [blame] | 14 | |