OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [template/] [error2.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
 
3
// Copyright (C) 2003 Free Software Foundation, Inc.
4
// Contributed by Nathan Sidwell 14 Aug 2003 
5
 
6
// required from did not indicate the nested class
7
 
8
template struct X
9
{
10
  T m;  // { dg-error "as type 'void'" "void" }
11
        // { dg-error "incomplete type" "incomplate" { target *-*-* } 10 }
12
        // { dg-error "invalid" "invalid" { target *-*-* } 10 }
13
};
14
 
15
template
16
struct Derived
17
{
18
  class Nested : public X // { dg-message "required" "" }
19
  {
20
  };
21
 
22
  Nested m; // { dg-message "required" "" }
23
 
24
  void Foo ();
25
};
26
 
27
void Foo (Derived &x)
28
{
29
  x.Foo (); // { dg-message "required" "" }
30
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.