C++ PATCH for c++/48969 (infinite template recursion with enum scope)
Jason Merrill
jason@redhat.com
Wed Jun 8 03:55:00 GMT 2011
Discussion on the committee reflectors referred me to N2634, the design
paper for the new SFINAE rules, which says that exceeding an
implementation limit is a hard error, not a substitution failure. So
this patch does away with the tracking of indivitual substitutions and
just uses push_tinst_level to handle nesting. On enum11.C the compiler
crashes before hitting the limit of 1024 due to excessive recursion, so
I've lowered the default for -ftemplate-depth to 900.
Tested x86_64-pc-linux-gnu, applied to trunk.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ded-tinst.patch
Type: text/x-patch
Size: 89217 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110608/e6a0e02d/attachment.bin>
More information about the Gcc-patches
mailing list