You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
339 B

// RUN: %clang_cc1 -fsyntax-only -verify %s
struct foo {
int a;
};
int main() {
struct foo xxx;
int i;
xxx = (struct foo)1; // expected-error {{used type 'struct foo' where arithmetic or pointer type is required}}
i = (int)xxx; // expected-error {{operand of type 'struct foo' where arithmetic or pointer type is required}}
}