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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.benjamin/] [warn02.C] - Diff between revs 305 and 338

Only display areas with differences | Details | Blame | View Log

Rev 305 Rev 338
// { dg-do assemble  }
// { dg-do assemble  }
// { dg-options "-Wredundant-decls" }
// { dg-options "-Wredundant-decls" }
// 980413 bkoz
// 980413 bkoz
// from g++/15307, tests for -Wredundant-decls
// from g++/15307, tests for -Wredundant-decls
// for friend functions and functions
// for friend functions and functions
extern int foo(const char *);
extern int foo(const char *);
class A
class A
{
{
  friend int foo(const char *);
  friend int foo(const char *);
  int a;
  int a;
};
};
class B
class B
{
{
  friend int foo(const char *);
  friend int foo(const char *);
  int foo2() {return b;}
  int foo2() {return b;}
  int b;
  int b;
};
};
class C
class C
{
{
  friend int foo(const char *);
  friend int foo(const char *);
  friend int foo(const char *); // { dg-warning "" }
  friend int foo(const char *); // { dg-warning "" }
  int foo2() {return b;}
  int foo2() {return b;}
  int b;
  int b;
};
};
class D
class D
{
{
public:
public:
  int foo2() {return b;}  // { dg-error "with" }
  int foo2() {return b;}  // { dg-error "with" }
  int foo2() {return b;}  // { dg-error "overloaded" }
  int foo2() {return b;}  // { dg-error "overloaded" }
  int b;
  int b;
};
};
class E
class E
{
{
public:
public:
  int foo2(); // { dg-error "with" }
  int foo2(); // { dg-error "with" }
  int foo2(); // { dg-error "overloaded" }
  int foo2(); // { dg-error "overloaded" }
  int b;
  int b;
};
};
extern int foo3(const char *);  // { dg-warning "" }
extern int foo3(const char *);  // { dg-warning "" }
extern int foo3(const char *);  // { dg-warning "" }
extern int foo3(const char *);  // { dg-warning "" }
 
 

powered by: WebSVN 2.1.0

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