This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/8772: Segmentation fault on 3 lines of template code
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: gcc-gnats at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, sneechy at hotmail dot com, gcc-bugs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, Zack Weinberg <zack at codesourcery dot com>
- Date: Sun, 01 Dec 2002 10:38:59 +0100
- Subject: Re: c++/8772: Segmentation fault on 3 lines of template code
Most probably illegal. EDG-based compilers emit:
"8772.cc", line 3: error: nontype "A<<unnamed>>::B [with <unnamed>=n]" is not
a class template
template <int n> struct D { enum { v = C<A<n>::B>::v }; };
^
"8772.cc", line 2: error: incomplete type is not allowed
template <template <int> class F> struct C { enum { v = F<1>::v || 2 }; };
^
detected during instantiation of class "C<F> [with F=<error>]" at
line 3
2 errors detected in the compilation of "8772.cc".
Ciao,
Paolo.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8772