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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.jason/] [member.C] - Rev 12

Compare with Previous | Blame | View Log

// { dg-do assemble  }
// GROUPS passed member-pointers error-reporting
struct Y
{
  struct X
    {
      int A;
      int Y::X::* foo () { undef1(1); return &Y::X::A; }// { dg-error "" } foo().*
      int bar () { return A; }
    };
};

int Y::X::* foo ()
{
  undef2(1);// { dg-error "" } foo().*
  return &Y::X::A;
}

int Y::X::* (* foo2 ())()
{
  undef3(1);// { dg-error "" } foo().*
  return foo;
}

int (Y::X::* bar2 ()) ()
{
  undef4(1);// { dg-error "" } foo\(\).*
  return Y::X::bar;// { dg-error "" } foo\(\).*
}

int Y::X::* (Y::X::* foo3 ())()
{
  undef5(1);// { dg-error "" } foo().*
  return Y::X::foo;// { dg-error "" } foo().*
}

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.