Commit 6d1e16d7 by Jason Merrill

new

From-SVN: r32058
parent 8ade4771
// Test that using an elaborated-type-specifier in a namespace to refer
// to a class outside the namespace does not cause its name to be considered
// declared in the namespace.
// Contributed by Jason Merrill <jason@cygnus.com>
// Build don't link:
struct A { };
int A;
namespace N {
struct A *f ();
}
using namespace N;
struct A *a;
// Test that g++ allows friends to use private types in their declarations.
// Build don't link:
class A {
typedef int I;
friend I f (I);
};
A::I f (A::I);
A::I f (A::I) { return 0; }
// Bug: g++ thought this was a redeclaration of a local variable.
// Build don't link:
int i;
int main ()
{
extern int i;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment