]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/cp/pt.c
re PR c++/18093 (bogus conflict in namespace aliasing)
authorMark Mitchell <mark@codesourcery.com>
Wed, 27 Oct 2004 02:23:16 +0000 (02:23 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Wed, 27 Oct 2004 02:23:16 +0000 (02:23 +0000)
commita5201a9197a9083b71098914c9dfd97249db5249
tree62c200d8b2b8702e81da0dc741d655791644796a
parent0a3d71f54af134bcafea29a8f8021d8bbf24cfb4
re PR c++/18093 (bogus conflict in namespace aliasing)

PR c++/18093
* search.c (current_scope): Return the innermost non-block scope,
not the innermost non-block, non-namespace scope.
(at_namespace_scope_p): Adjust accordingly.
(dfs_accessible_post): Do not pass namespaces to is_friend.
(dfs_walk_once_accessible_r): Likewise.
* decl.c (grokvardecl): Adjust call to current_scope.
(build_enumerator): Likewise.
* parser.c (cp_parser_using_declaration): Likewise.
(cp_parser_direct_declarator): Use at_namespace_scope_p instead of
current_scope.
(cp_parser_class_head): Adjust call to current_scope.
* name-lookup.c (do_namespace_alias): Set the DECL_CONTEXT for the
alias.

PR c++/18020
* pt.c (tusbst_copy_and_build): Resolve enumeration constants to
their underlying values.

PR c++/18161
* typeck.c (build_binary_op): Honor build_type, even when in a
template.

PR c++/18093
* g++.dg/lookup/ns2.C: New test.

PR c++/18020
* g++.dg/template/enum4.C: New test.

PR c++/18161
* g++.dg/template/expr1.C: New test.

From-SVN: r89627
gcc/cp/ChangeLog
gcc/cp/decl.c
gcc/cp/name-lookup.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/search.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lookup/ns2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/enum4.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/expr1.C [new file with mode: 0644]