/cp
2016-12-11 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/78637
* parser.c (cp_parser_namespace_definition): Increment
nested_definition_count only if push_namespace succeeds.
/testsuite
2016-12-11 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/78637
* g++.dg/parse/namespace14.C: New.
From-SVN: r243529
+2016-12-11 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/78637
+ * parser.c (cp_parser_namespace_definition): Increment
+ nested_definition_count only if push_namespace succeeds.
+
2016-12-08 Nathan Sidwell <nathan@acm.org>
PR c++/78551
cp_parser_error (parser, "nested identifier required");
break;
}
- ++nested_definition_count;
- push_namespace (identifier);
+ if (push_namespace (identifier))
+ ++nested_definition_count;
}
}
+2016-12-11 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/78637
+ * g++.dg/parse/namespace14.C: New.
+
2016-12-10 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/78720
--- /dev/null
+// PR c++/78637
+
+namespace X {
+class Y;
+}
+namespace X::Y z; // { dg-error "namespace|expected|type" }