[Bug c++/13886] Compiler crash on deeply nested template

giovannibajo at libero dot it gcc-bugzilla@gcc.gnu.org
Fri Jan 30 13:05:00 GMT 2004


------- Additional Comments From giovannibajo at libero dot it  2004-01-30 13:04 -------
David,

ISO C++ says that a compliant C++ compile must implement at least 17 recursive 
levels for template instantiation. We do keep a default limit around 500 for a 
good reason, which is trying not to break stack or memory limits. By the look 
of your error logs, GCC instantiate about 3300 templates before dieing. 

There is no way you will ever be able to compile such a program on any C++ 
compiler on earth. If you do, you can as well try recompiling G++ with a larger 
stack size. Besides, the problem is *PURELY* academic, since no real-world code 
will ever look like that.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13886



More information about the Gcc-bugs mailing list