Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/warn/Wunused-var-28.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
rev | line source |
---|---|
131 | 1 // PR c++/82799 |
2 // { dg-do compile } | |
3 // { dg-options "-Wunused-but-set-variable" } | |
4 | |
5 enum E { b }; | |
6 struct C { | |
7 template <E> | |
8 int foo () | |
9 { | |
10 const bool i = 0; // { dg-bogus "set but not used" } | |
11 const int r = i ? 7 : 9; | |
12 return r; | |
13 } | |
14 void bar () { foo <b> (); } | |
15 }; |