diff options
author | Volker Reichelt <reichelt@igpm.rwth-aachen.de> | 2006-04-19 18:07:19 +0000 |
---|---|---|
committer | Volker Reichelt <reichelt@gcc.gnu.org> | 2006-04-19 18:07:19 +0000 |
commit | 0014c2479a0e42f96dba222fe391800fa8c57660 (patch) | |
tree | 3ebacbeadc17d9edc289f351c2c75786f58723b8 /gcc/cp | |
parent | b815a6316cbd95ebdd3f049627db5932efc9c9b7 (diff) | |
download | gcc-0014c2479a0e42f96dba222fe391800fa8c57660.zip gcc-0014c2479a0e42f96dba222fe391800fa8c57660.tar.gz gcc-0014c2479a0e42f96dba222fe391800fa8c57660.tar.bz2 |
re PR c++/26739 (ICE in g++.old-deja/g++.pt/friend36.C)
PR c++/26739
* pt.c (tsubst_friend_function): Return early if
pushdecl_namespace_level fails.
* g++.old-deja/g++.pt/friend36.C: Adjust error markers.
From-SVN: r113090
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/pt.c | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index aa5b60e..c3df66d 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2006-04-19 Volker Reichelt <reichelt@igpm.rwth-aachen.de> + PR c++/26739 + * pt.c (tsubst_friend_function): Return early if + pushdecl_namespace_level fails. + PR c++/26036 * typeck.c (convert_arguments): Return error_mark_node instead of error_mark_list. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 83bfd12..fbe01db 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -5230,6 +5230,9 @@ tsubst_friend_function (tree decl, tree args) old_decl = pushdecl_namespace_level (new_friend, /*is_friend=*/true); pop_nested_namespace (ns); + if (old_decl == error_mark_node) + return error_mark_node; + if (old_decl != new_friend) { /* This new friend declaration matched an existing |