summaryrefslogtreecommitdiffstats
path: root/test/Sema/cast.c
blob: ec19626d28e01fb6a72a99d7b84b840ef5925a0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// RUN: clang-cc -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}}
}

OpenPOWER on IntegriCloud