Commit c8649fde by Alexandre Oliva Committed by Alexandre Oliva

* template8.C, typeof1.C: New test.

From-SVN: r28189
parent 7f4edbcb
1999-07-20 Alexandre Oliva <oliva@dcc.unicamp.br>
* template8.C, typeof1.C: New test.
1999-07-17 Alexandre Oliva <oliva@dcc.unicamp.br>
* template6.C, delete1.C, template7.C: New test.
......
// Build don't link:
// Copyright (C) 1999 Free Software Foundation
// by Alexandre Oliva <oliva@dcc.unicamp.br>
// simplified from bug report by redleaf <e1wwater@dingo.cc.uq.edu.au>
struct B {
template <class> void bar();
} b;
template <class T> void foo() {
b.bar<T>(); // gets bogus error - bar undeclared - XFAIL *-*-*
b.template bar<T>(); // gets bogus error - ditto - XFAIL *-*-*
b.B::bar<T>(); // ok
}
template void foo<void>(); // gets bogus error - XFAIL *-*-*
// Build don't link:
// Copyright (C) 1999 Free Software Foundation
// by Alexandre Oliva <oliva@dcc.unicamp.br>
struct B {
int i;
};
template <class T> void foo(T b) {
b.T::i; // ok
// b.__typeof__(b)::i; // parse error, should this be accepted?
typedef T t1;
b.t1::i; // ok
typedef __typeof__(b) t2;
b.t2::i; // crash test - XFAIL *-*-*
}
template void foo(B); // not needed for the crash
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment