mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-05 17:30:58 +08:00
re PR c++/78637 (ICE on invalid C++ code on x86_64-linux-gnu (internal compiler error: in pop_namespace, at cp/name-lookup.c:3826))
/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
This commit is contained in:
parent
a2cb05ed72
commit
a1f7d967aa
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
@ -18184,8 +18184,8 @@ cp_parser_namespace_definition (cp_parser* parser)
|
||||
cp_parser_error (parser, "nested identifier required");
|
||||
break;
|
||||
}
|
||||
++nested_definition_count;
|
||||
push_namespace (identifier);
|
||||
if (push_namespace (identifier))
|
||||
++nested_definition_count;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
6
gcc/testsuite/g++.dg/parse/namespace14.C
Normal file
6
gcc/testsuite/g++.dg/parse/namespace14.C
Normal file
@ -0,0 +1,6 @@
|
||||
// PR c++/78637
|
||||
|
||||
namespace X {
|
||||
class Y;
|
||||
}
|
||||
namespace X::Y z; // { dg-error "namespace|expected|type" }
|
Loading…
x
Reference in New Issue
Block a user