repo.or.cz
/
gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fortran: Fix PR 47485.
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wunused-label-4.C
blob
d194f043d215117d2b84123d0f0e00d1ada03281
1
// PR c++/113582
2
// { dg-do compile { target c++17 } }
3
// { dg-options "-Wunused-label" }
4
5
template<bool B> void
6
do_something ()
7
{
8
#pragma GCC diagnostic push
9
#pragma GCC diagnostic ignored "-Wunused-label"
10
start:
11
if constexpr(B)
12
goto start;
13
#pragma GCC diagnostic pop
14
}
15
16
template<bool B> void
17
do_something2 ()
18
{
19
start: // { dg-warning "defined but not used" }
20
if constexpr(B)
21
goto start;
22
}
23
24
void
25
g ()
26
{
27
do_something<0>();
28
do_something2<0>();
29
}