summaryrefslogtreecommitdiff
path: root/gcc/c-family/c-common.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-07 21:54:07 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2011-06-07 21:54:07 +0000
commit8ce5985492e01af26fb8cabcc38118f8ae0a91e2 (patch)
tree98e87e498bdd1f36569c008ebee5e40e0895652a /gcc/c-family/c-common.c
parentee662d6d621fd06c26894dab6625036ec8383846 (diff)
downloadgcc-8ce5985492e01af26fb8cabcc38118f8ae0a91e2.tar.gz
PR c++/48969
PR c++/44175 gcc/c-family/ * c-common.c (max_tinst_depth): Lower default to 900. gcc/cp/ * error.c (subst_to_string): New. (cp_printer): Use it for 'S'. (print_instantiation_partial_context_line): Handle subst context. * pt.c (push_tinst_level): Handle subst context. (deduction_tsubst_fntype): Don't track specific substitutions. Use push_tinst_level. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174772 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-family/c-common.c')
-rw-r--r--gcc/c-family/c-common.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index e5c070f940b..37a5f1e45d4 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -255,10 +255,13 @@ int flag_use_repository;
enum cxx_dialect cxx_dialect = cxx98;
/* Maximum template instantiation depth. This limit exists to limit the
- time it takes to notice excessively recursive template instantiations;
- the default value of 1024 is likely to be in the next C++ standard. */
+ time it takes to notice excessively recursive template instantiations.
-int max_tinst_depth = 1024;
+ The default is lower than the 1024 recommended by the C++0x standard
+ because G++ runs out of stack before 1024 with highly recursive template
+ argument deduction substitution (g++.dg/cpp0x/enum11.C). */
+
+int max_tinst_depth = 900;
/* The elements of `ridpointers' are identifier nodes for the reserved
type names and storage classes. It is indexed by a RID_... value. */