Add include needed for MSVC.
[clang/acc.git] / test / Sema / attr-weak.c
blob4e288673feb6cf59b9cb2acf98ad6417c4eb434f
1 // RUN: clang-cc -verify -fsyntax-only %s
3 extern int g0 __attribute__((weak));
4 extern int g1 __attribute__((weak_import));
5 int g2 __attribute__((weak));
6 int g3 __attribute__((weak_import)); // expected-warning {{'weak_import' attribute cannot be specified on a definition}}
7 int __attribute__((weak_import)) g4(void);
8 int __attribute__((weak_import)) g5(void) {
11 struct __attribute__((weak)) s0 {}; // expected-warning {{'weak' attribute only applies to variable and function types}}
12 struct __attribute__((weak_import)) s1 {}; // expected-warning {{'weak_import' attribute only applies to variable and function types}}
14 static int x __attribute__((weak)); // expected-error {{weak declaration of 'x' must be public}}