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++/37920] ICE (segv) with typename typeof in local struct



------- Comment #3 from pinskia at gcc dot gnu dot org  2008-10-27 01:32 -------
Reduced testcase:
template<typename T> T& ensure_obj(const T&);
template <typename T>
void func2(T& t)
{
  typedef __typeof__(ensure_obj(t)) ttt;
  struct ttt1 
  { 
    ttt1( ttt arg0 ){}
  }  tttt ( t );
}
main()
{
  double d = 5;
  func2(d);
}


---- CUT ----
If I use decltype (which is part of the C++0x standard), it works ....


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|0000-00-00 00:00:00         |2008-10-27 01:32:09
               date|                            |
            Summary|ICE (segv) with typename    |ICE (segv) with typename
                   |typeof                      |typeof in local struct


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


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