aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorKriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>2003-09-27 16:34:28 +0000
committerKriang Lerdsuwanakij <lerdsuwa@gcc.gnu.org>2003-09-27 16:34:28 +0000
commit9075a30574d3d2a32f0678c3a0e53de1f1724221 (patch)
tree4cbb087b90846ae3348658234ce5c76688d7e673 /gcc
parent337f35bbdcc9988f8c707d807c165b02a5896378 (diff)
downloadgcc-9075a30574d3d2a32f0678c3a0e53de1f1724221.zip
gcc-9075a30574d3d2a32f0678c3a0e53de1f1724221.tar.gz
gcc-9075a30574d3d2a32f0678c3a0e53de1f1724221.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/parser.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index cbf9b54..c897dac 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 7764290..7968b28 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -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",