[Bug c++/52849] New: crash when using suscript operator in delctype argument
freunddeslichts at web dot de
gcc-bugzilla@gcc.gnu.org
Tue Apr 3 18:25:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52849
Bug #: 52849
Summary: crash when using suscript operator in delctype
argument
Classification: Unclassified
Product: gcc
Version: 4.4.7
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: freunddeslichts@web.de
// the following compile crashes
// $> g++-4.4 -std=c++0x gcc44_bug.cpp
// it works in 4.5, but I'm writing a library that must work on all versions
// exact version is 4.4.7 (Ubuntu/Linaro 4.4.7-1ubuntu1) on 32 bit Linux
template <class T>
auto bug(T* t) -> decltype(t[0])
{
return *t;
}
int main(void)
{
int i;
bug(&i);
return 0;
}
More information about the Gcc-bugs
mailing list