If the qualified-id in a using declaration nominates ambiguous hidden class or enumerator names, the current code generates an unhelpful error message followed by an ICE. This patch generates a more detailed error message and handles the event gracefully. Tested with a C/C++/Java bootstrap and testsuite on i686-pc-linux-gnu. Ollie :ADDPATCH c++: 2007-08-06 Ollie Wild * name-lookup.c (do_nonmember_using_decl): Print an error for ambiguous type lookups. (ambiguous_decl): Construct tree of ambiguous types. Remove extaneous function parameter. (unqualified_namespace_lookup): Fix ambiguous_decl call. (lookup_using_namespace): Fix ambiguous_decl call. (qualified_lookup_using_namespace): Fix ambiguous_decl call. 2007-08-06 Ollie Wild * g++.dg/lookup/using18.C: New test.