https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86503

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>-ftemplate-depth=1000000

This is not a bug, the whole point of template-depth is to prevent the crashes
like this from happening.


Anyways clang on the trunk says:

<source>:15:9: warning: stack nearly exhausted; compilation time may suffer,
and crashes due to stack overflow are likely [-Wstack-exhausted]
typeof( ft< F, n-1 >( F(), 0 ) )
        ^
...

<source>:15:9: fatal error: recursive template instantiation exceeded maximum
depth of 1024
typeof( ft< F, n-1 >( F(), 0 ) )
        ^

Reply via email to