Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/other/pr82032.C @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
rev | line source |
---|---|
111 | 1 /* { dg-do compile } */ |
2 /* { dg-options "-O3 -Wno-return-type" } */ | |
3 | |
4 template <typename a> class b | |
5 { | |
6 public: | |
7 typename a::aa operator[] (typename a::c) { } | |
8 }; | |
9 class d | |
10 { | |
11 public: | |
12 typedef long c; | |
13 typedef int aa; | |
14 }; | |
15 struct e | |
16 { | |
17 int af[4]; | |
18 int ag; | |
19 }; | |
20 b<d> f; | |
21 bool | |
22 g (e &i) | |
23 { | |
24 for (int h; h; ++h) | |
25 switch (f[h]) | |
26 { | |
27 case 'x': | |
28 case 'a': | |
29 i.af[h] = 3; | |
30 break; | |
31 default: | |
32 return false; | |
33 } | |
34 | |
35 return true; | |
36 } |