comparison clang/test/Sema/warn-unused-label.c @ 150:1d019706d866

LLVM10
author anatofuz
date Thu, 13 Feb 2020 15:10:13 +0900
parents
children c4bab56944e8
comparison
equal deleted inserted replaced
147:c2174574ed3a 150:1d019706d866
1 // RUN: %clang_cc1 -fsyntax-only -Wunused-label -verify %s
2
3 void f() {
4 a:
5 goto a;
6 b: // expected-warning{{unused}}
7 c: __attribute__((unused));
8 d: __attribute__((noreturn)); // expected-warning {{'noreturn' attribute only applies to functions}}
9 goto d;
10 return;
11 }
12
13 void PR8455() {
14 L: __attribute__((unused)) return; // ok, no semicolon required
15 }