re PR c++/78637 (ICE on invalid C++ code on x86_64-linux-gnu (internal compiler error...
authorPaolo Carlini <paolo.carlini@oracle.com>
Sun, 11 Dec 2016 18:15:31 +0000 (18:15 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Sun, 11 Dec 2016 18:15:31 +0000 (18:15 +0000)
commita1f7d967aa8425806836bdf291cacecb8a636df0
treef5c1aa5090e7cf4acf7a9e1653b335f3c5639f1d
parenta2cb05ed72fea4dda63b1d879970f430765e3db7
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
gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/parse/namespace14.C [new file with mode: 0644]