mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-23 13:35:42 -04:00

the GNU documentation: the attribute only appertains to the label if it is followed by a semicolon. Based on a patch by Aaron Ballman! llvm-svn: 194869
16 lines
361 B
C
16 lines
361 B
C
// RUN: %clang_cc1 -fsyntax-only -Wunused-label -verify %s
|
|
|
|
void f() {
|
|
a:
|
|
goto a;
|
|
b: // expected-warning{{unused}}
|
|
c: __attribute__((unused));
|
|
d: __attribute__((noreturn)); // expected-warning {{'noreturn' attribute only applies to functions}}
|
|
goto d;
|
|
return;
|
|
}
|
|
|
|
void PR8455() {
|
|
L: __attribute__((unused)) return; // ok, no semicolon required
|
|
}
|