Commit 19333f70 by Jason Merrill Committed by Jason Merrill

x

From-SVN: r20237
parent 3e3f722c
1998-06-05 Jason Merrill <jason@yorick.cygnus.com>
* error.c (cp_printers): Use 'o' instead of '_' for the null entry.
1998-06-05 Martin v. Loewis <loewis@informatik.hu-berlin.de>
* cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
......
namespace A{
struct X{};
void f(X&);
extern int i;
namespace a_very_long_namespace_name{
int k;
}
}
namespace B = A;
namespace B = A;
namespace B = B;
namespace avl = A::a_very_long_namespace_name;
void B::f(A::X& x)
{
B::f(x);
f(x);
avl::k = 1;
}
int B::i = 0;
int main()
{
B::X x;
if (B::i)
A::f(x);
}
namespace A = B; // ERROR - unknown namespace
namespace C{}
namespace D = C;
namespace D { // ERROR - reopening namespace with alias
void f();
}
void C::f(){} // ERROR - previous definition
void D::f(){} // ERROR - redefinition
namespace E = C::F; // ERROR - unknown namespace
//Build don't link:
//Check association of {error} for Koenig lookup
class QString { };
// Build don't link:
// Check association of {error} for Koenig lookup
// Special g++ Options:
struct QString { operator void * (); };
int foo()
{
QString bar;
if (bar == __null ) {
}
QString bar;
return (bar == __null );
}
// Build don't link:
typedef unsigned int atypedef;
struct astruct{};
void afunction();
......
......@@ -8,15 +8,14 @@ struct X{
};
void f(X *x = new X); // ERROR -
void f(X *x = new X); // ERROR -
void f(X *x = new X(4)); // ERROR -
void f(X *x = new X(4)); // ERROR -
void f(X *x = new X[4]); // ERROR -
void f(X *x = new X[4]); // ERROR -
void f(X *x = new (3) X(6)); // ERROR -
void f(X *x = new (3) X(6)); // ERROR -
void f(X *x = new (2) X[10]); // ERROR -
void f(X *x = new X[10][5]); // ERROR -
void f(X *x = new (2) X[10]); // ERROR -
void f(X *x = new X[10][5]); // ERROR -
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