freebsd-nq/test/Sema/cast.c
2010-01-01 10:34:51 +00:00

19 lines
402 B
C

// RUN: %clang_cc1 -fsyntax-only %s -verify
typedef struct { unsigned long bits[(((1) + (64) - 1) / (64))]; } cpumask_t;
cpumask_t x;
void foo() {
(void)x;
}
void bar() {
char* a;
double b;
b = (double)a; // expected-error {{pointer cannot be cast to type}}
a = (char*)b; // expected-error {{cannot be cast to a pointer type}}
}
long bar1(long *next) {
return (long)(*next)++;
}