2010-09-20 05:21:25 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -Wunused-label -verify %s
|
|
|
|
|
|
|
|
void f() {
|
|
|
|
a:
|
|
|
|
goto a;
|
|
|
|
b: // expected-warning{{unused}}
|
2011-02-18 04:34:02 +08:00
|
|
|
c: __attribute__((unused));
|
|
|
|
d: __attribute__((noreturn)); // expected-warning {{'noreturn' attribute only applies to functions}}
|
2010-09-28 22:54:07 +08:00
|
|
|
goto d;
|
2010-09-20 05:21:25 +08:00
|
|
|
return;
|
|
|
|
}
|