]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/cp/pt.c
re PR c++/30818 (templates and typedefs cause function prototype not to match)
authorNathan Sidwell <nathan@codesourcery.com>
Sun, 22 Jul 2007 16:25:54 +0000 (16:25 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Sun, 22 Jul 2007 16:25:54 +0000 (16:25 +0000)
commit4195a76796f2a88bbbcb0947b3fc8cfb590bcf28
treedfb789ad9be1e19231b508e1334e98d3418748a1
parent7e24f16cf7d70e74c60985f7591cbf2e129a23da
re PR c++/30818 (templates and typedefs cause function prototype not to match)

cp/
PR c++/30818
* typeck.c (structural_comptypes): No need to check
resolve_typename_type return value here.
* cp-tree.h (TYPENAME_IS_RESOLVING_P): New.
* pt.c (resolve_typename_type): Follow typename typedefs.  Return
original type rather than error_mark_node in case of failure.
* parser.c (cp_parser_nested_name_specifier_opt): Adjust
resolve_typename_type result check.
(cp_parser_direct_declarator, cp_parser_head,
cp_parser_constructor_declarator_p): Likewise.

testsuite/
PR c++/30818
* g++.dg/template/crash47.C: Adjust errors.
* g++.dg/template/crash48.C: Adjust errors.
* g++.dg/template/typename12.C: New.
* g++.dg/template/typename13.C: New.
* g++.dg/template/typename14.C: New.
* g++.dg/template/typedef6.C: Adjust errors.

From-SVN: r126825
12 files changed:
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/crash47.C
gcc/testsuite/g++.dg/template/crash48.C
gcc/testsuite/g++.dg/template/typedef6.C
gcc/testsuite/g++.dg/template/typename12.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/typename13.C [new file with mode: 0644]
gcc/testsuite/g++.dg/template/typename14.C [new file with mode: 0644]