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] - Rev 801

Go to most recent revision | Compare with Previous | Blame | View Log

// { dg-do compile }

// Copyright (C) 2003 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 14 Aug 2003 <nathan@codesourcery.com>

// required from did not indicate the nested class

template<class T> struct X
{
  T m;  // { dg-error "as type 'void'" "void" }
        // { dg-error "incomplete type" "incomplate" { target *-*-* } 10 }
        // { dg-error "invalid" "invalid" { target *-*-* } 10 }
};

template<class T >
struct Derived
{
  class Nested : public X<T> // { dg-message "required" "" }
  {
  };
  
  Nested m; // { dg-message "required" "" }
  
  void Foo ();
};

void Foo (Derived<void> &x)
{
  x.Foo (); // { dg-message "required" "" }
}

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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