blob: d2e3e0c7e3a1bfafcf792a92495c31b45fbcf161 [file] [log] [blame]
Daniel Dunbard7d5f022009-03-24 02:24:46 +00001// RUN: clang-cc -fsyntax-only %s -verify
Chris Lattner3da2db42007-10-29 04:26:44 +00002
3typedef struct { unsigned long bits[(((1) + (64) - 1) / (64))]; } cpumask_t;
4cpumask_t x;
5void foo() {
6 (void)x;
7}
Eli Friedman41826bb2009-05-01 02:23:58 +00008void 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 Lattner3da2db42007-10-29 04:26:44 +000014
Fariborz Jahaniana79f8b32009-11-23 19:51:43 +000015long bar1(long *next) {
16 return (long)(*next)++;
17}
18