re PR c++/13092 (Accepts invalid pointer-to-member conversion)
authorKriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
Sun, 18 Jul 2004 12:37:57 +0000 (12:37 +0000)
committerKriang Lerdsuwanakij <lerdsuwa@gcc.gnu.org>
Sun, 18 Jul 2004 12:37:57 +0000 (12:37 +0000)
commit3601f00362e227160cae47efbb179a579f5a5f51
treed79f98c004fe4bbd1222c18f019ba3f4157791c8
parent605570470c75d5ff7ef2285ef6dfe61948607379
re PR c++/13092 (Accepts invalid pointer-to-member conversion)

PR c++/13092
* init.c (build_offset_ref): Build SCOPE_REF with non-null
TREE_TYPE for non-dependent names.
* typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
* pt.c (type_dependent_expression_p): Handle SCOPE_REF with
unknown_type_node as its TREE_TYPE.
* cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
* error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
(dump_expr) <SCOPE_REF case>: Likewise.

* g++.dg/template/non-dependent7.C: New test.
* g++.dg/template/non-dependent8.C: Likewise.
* g++.dg/template/non-dependent9.C: Likewise.
* g++.dg/template/non-dependent10.C: Likewise.

From-SVN: r84889
gcc/cp/ChangeLog
gcc/cp/cxx-pretty-print.c
gcc/cp/error.c
gcc/cp/init.c
gcc/cp/pt.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/non-dependent10.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/non-dependent7.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/non-dependent8.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/non-dependent9.C [new file with mode: 0644]