llvm-project/clang/test/Sema/invalid-init-diag.c

5 lines
165 B
C

// RUN: %clang_cc1 %s -verify -fsyntax-only
int a;
struct {int x;} x = a; // expected-error {{incompatible type initializing 'int', expected 'struct <anonymous>'}}