This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]