re PR c++/34758 (Bad diagnostic for circular dependency in constructor default argument)
authorJason Merrill <jason@gcc.gnu.org>
Tue, 15 Mar 2011 18:27:09 +0000 (14:27 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 15 Mar 2011 18:27:09 +0000 (14:27 -0400)
commit4c66d85a558f15893d846c0d7d5e9885b8cdf842
tree37f9886968ac0a2a5f0f68d1dc00396a32a27f3f
parent56b67510587aa6aa75884ee45f4ddd9108bde7c3
re PR c++/34758 (Bad diagnostic for circular dependency in constructor default argument)

PR c++/34758
* call.c (convert_default_arg): Use DECL_ORIGIN of fn.  Check for
recursion first.
(push_defarg_context, pop_defarg_context): New.
* parser.c (cp_parser_late_parsing_default_args): Use them.
* cp-tree.h: Declare them.

From-SVN: r171009
gcc/cp/ChangeLog
gcc/cp/call.c
gcc/cp/cp-tree.h
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/parse/pr34758.C [new file with mode: 0644]