Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.oliva/typeof1.C

raw
1 // { dg-do assemble }
2
3 // Copyright (C) 1999 Free Software Foundation
4
5 // by Alexandre Oliva <[email protected]>
6
7 struct B {
8 int i;
9 };
10
11 template <class T> void foo(T b) {
12 b.T::i; // ok
13 // b.__typeof__(b)::i; // parse error, should this be accepted?
14 typedef T t1;
15 b.t1::i; // ok
16 typedef __typeof__(b) t2;
17 }
18
19 template void foo(B); // not needed for the crash