* semantics.c (finish_non_static_data_member): Call maybe_dummy_object
[official-gcc/constexpr.git] / gcc / testsuite / g++.dg / template / error2.C
blob5bd9b870e7a5e92682157603f56a5dd6665c2d14
1 // { dg-do compile }
3 // Copyright (C) 2003 Free Software Foundation, Inc.
4 // Contributed by Nathan Sidwell 14 Aug 2003 <nathan@codesourcery.com>
6 // instantiated from did not indicate the nested class
8 template<class T> struct X
10   T m;  // { dg-error "as type 'void'" "void" }
11         // { dg-error "incomplete type" "incomplate" { target *-*-* } 10 }
12         // { dg-error "invalid" "invalid" { target *-*-* } 10 }
15 template<class T >
16 struct Derived
18   class Nested : public X<T> // { dg-message "instantiated" "" }
19   {
20   };
21   
22   Nested m; // { dg-message "instantiated" "" }
23   
24   void Foo ();
27 void Foo (Derived<void> &x)
29   x.Foo (); // { dg-message "instantiated" "" }