blob: 7d0265ef323787b1632f21f0e08fa3c3dbd6458b [file] [log] [blame]
Daniel Dunbarb88b4f72009-02-13 19:23:53 +00001// RUN: clang -verify -fsyntax-only %s
2
3struct __attribute__((used)) s { // expected-warning {{'used' attribute only applies to variable and function types}}
4 int x;
5};
6
7int a __attribute__((used));
8
9static void __attribute__((used)) f0(void) {
10}
11
12void f1() {
13 static int a __attribute__((used));
14 int b __attribute__((used)); // expected-warning {{used attribute ignored}}
15}
16
17