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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [conversion/] [to-virtual-base-1.C] - Rev 816

Compare with Previous | Blame | View Log

// Copyright (C) 2002 Free Software Foundation
// Contributed by Gabriel Dos Reis <gdr@integrable-solutions.net>

struct A {
  virtual void f(const A* a) = 0;
};

struct B : virtual A {
  virtual void f(const A* a);
};

void B::f(const A* a)
{
  static_cast<const B&>(*a);             // { dg-error "" }
}

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.