diff options
author | Jason Merrill <jason@redhat.com> | 2011-06-07 17:54:07 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-06-07 17:54:07 -0400 |
commit | 3ff609751050030ea83a7ff58eca5c07a3adcdfc (patch) | |
tree | 98e87e498bdd1f36569c008ebee5e40e0895652a /gcc/c-family | |
parent | 783c26ae6798141f9822f52b45b24abf685c0afc (diff) | |
download | gcc-3ff609751050030ea83a7ff58eca5c07a3adcdfc.zip gcc-3ff609751050030ea83a7ff58eca5c07a3adcdfc.tar.gz gcc-3ff609751050030ea83a7ff58eca5c07a3adcdfc.tar.bz2 |
re PR c++/48969 (ICE with -std=c++0x)
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.
From-SVN: r174772
Diffstat (limited to 'gcc/c-family')
-rw-r--r-- | gcc/c-family/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/c-family/c-common.c | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index 0e71e37..97913c4 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,5 +1,7 @@ 2011-06-07 Jason Merrill <jason@redhat.com> + * c-common.c (max_tinst_depth): Lower default to 900. + * c-format.c (gcc_cxxdiag_char_table): Add 'S' format. 2011-06-07 Richard Guenther <rguenther@suse.de> diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index e5c070f..37a5f1e 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. */ |