This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/37920] ICE (segv) with typename typeof in local struct
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Oct 2008 01:32:09 -0000
- Subject: [Bug c++/37920] ICE (segv) with typename typeof in local struct
- References: <bug-37920-16866@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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