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]

[Bug c++/39070] Segmentation fault



------- Comment #3 from kononov at ftml dot net  2009-02-12 23:49 -------
$ cat t.cc
template<typename X> struct junk {
   template<typename Z> static Z& y();
   template<typename Y> static int  test(...);
   template<typename Y> static char test(typeof(y<Y>())*);
   static int const value=sizeof(test<X>(0));
};
typedef char type[junk<int>::value==sizeof(char) ? 1 : -1];

g++ 4.3.2 is happy with the above code.
g++ 4.3.3 gives a segfault.


-- 


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


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