Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/warn/Wunused-var-11.C @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 // PR c++/44412 |
2 // { dg-do compile } | |
3 // { dg-options "-Wunused" } | |
4 | |
5 struct S | |
6 { | |
7 int foo (); | |
8 static int bar (); | |
9 }; | |
10 | |
11 int S::foo () | |
12 { | |
13 return 5; | |
14 } | |
15 | |
16 int S::bar () | |
17 { | |
18 return 6; | |
19 } | |
20 | |
21 int | |
22 f1 () | |
23 { | |
24 S s; | |
25 return s.foo (); | |
26 } | |
27 | |
28 int | |
29 f2 () | |
30 { | |
31 S s; | |
32 return s.bar (); | |
33 } |