re PR c++/11415 (Error message with ::::)

PR c++/11413
	* parser.c (cp_parser_nested_name_specifier_opt): Issue correct
	error message when parser->scope is global_namespace.

From-SVN: r71856
This commit is contained in:
Kriang Lerdsuwanakij 2003-09-27 16:34:28 +00:00 committed by Kriang Lerdsuwanakij
parent 337f35bbdc
commit 9075a30574
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2003-09-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/11413
* parser.c (cp_parser_nested_name_specifier_opt): Issue correct
error message when parser->scope is global_namespace.
2003-09-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
* cp-tree.h, name-lookup.h, decl.c, decl2.c: Remove reference to

View File

@ -2997,6 +2997,10 @@ cp_parser_nested_name_specifier_opt (cp_parser *parser,
error ("`%T::%D' is not a class-name or "
"namespace-name",
parser->scope, token->value);
else if (parser->scope == global_namespace)
error ("`::%D' is not a class-name or "
"namespace-name",
token->value);
else
error ("`%D::%D' is not a class-name or "
"namespace-name",