URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
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 "" }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.