1 // RUN: %clang_cc1 -fsyntax-only -verify %s 2 3 void foo(); 4 void foo() __attribute__((unused)); 5 void foo() __attribute__((unused)); 6 void foo(){} // expected-note {{previous definition is here}} 7 void foo() __attribute__((constructor)); // expected-warning {{must precede definition}} 8 void foo(); 9 10 int bar; 11 extern int bar; 12 int bar; 13 int bar __attribute__((weak)); 14 int bar __attribute__((used)); 15 extern int bar __attribute__((weak)); 16 int bar = 0; // expected-note {{previous definition is here}} 17 int bar __attribute__((weak)); // expected-warning {{must precede definition}} 18 int bar; 19 20