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++.brendan/] [arm2.C] - Rev 12

Compare with Previous | Blame | View Log

// { dg-do assemble  }
// GROUPS passed ARM-compliance
// ARM 9.4 ``There cannot be a static and a nonstatic member function
//           with the same name and the same argument types.''
//
// The trick is to make sure it's caught with both orders (static,
// then normal, and vice-versa.

class X {
public:
  int foo();            // { dg-error "with" }
  static int foo();     // error: redeclaration// { dg-error "overloaded" } .*
};

class Y {
public:
   static int foo();    // { dg-error "with" }
  int foo();            // error: redeclaration// { dg-error "overloaded" } .*
};

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.