blob: e52dcaebbddb63529fa21c12d72b59e6ae0ac43e [file] [log] [blame]
Daniel Dunbara5728872009-12-15 20:14:24 +00001// RUN: %clang_cc1 -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