re PR c++/9128 (Typeid does not work on polymorphic classes)
authorMark Mitchell <mark@codesourcery.com>
Fri, 10 Jan 2003 20:30:56 +0000 (20:30 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Fri, 10 Jan 2003 20:30:56 +0000 (20:30 +0000)
commit2050a1bbac14451de357a7d78ffdc6621f49ab30
tree2cea45ec7f50f69c10cd2f4336195b5e297a14be
parent0cdca92b467aa92deec2819ff65652b87af6f1ea
re PR c++/9128 (Typeid does not work on polymorphic classes)

PR c++/9128
* g++.dg/rtti/typeid1.C: New file.

PR c++/9153
* g++.dg/parse/lookup1.C: New file.

PR c++/9171
* g++.dg/templ/spec5.C: New file.

* cp-tree.h (reparse_absdcl_as_expr): Remove.
(reparse_absdcl_as_casts): Likewise.
(reparse_decl_as_expr): Likewise.
(finish_decl_parsing): Likewise.
* decl2.c (reparse_absdcl_as_expr): Remove.
(reparse_absdcl_as_casts): Likewise.
(repase_decl_as_expr): Likewise.
(finish_decl_parsing): Likewise.

PR c++/9128
PR c++/9153
PR c++/9171
* parser.c (cp_parser_pre_parsed_nested_name_specifier): New
function.
(cp_parser_nested_name_specifier_opt): Correct the
check_dependency_p false.
(cp_parser_postfix_expression): Fix formatting.
(cp_parser_decl_specifier_seq): Avoid looking for constructor
declarators when possible.
(cp_parser_template_id): Avoid performing name-lookup when
possible.
(cp_parser_class_head): Do not count specializations when counting
levels of templates.
(cp_parser_constructor_declarator_p): Return immediately if
there's no chance that the tokens form a constructor declarator.
* rtti.c (throw_bad_typeid): Add comment.  Do not return an
expression with reference type.
(get_tinfo_decl_dynamic): Do not return an expression with
reference type.
(build_typeid): Add comment.  Do not return an expression with
reference type.
* typeck.c (build_class_member_access_expr): Improve handling of
conditionals and comma-expressions as objects.

From-SVN: r61166
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl2.c
gcc/cp/parser.c
gcc/cp/rtti.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/parse/lookup1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/rtti/typeid1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/spec5.C [new file with mode: 0644]