This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/57044] New: The following code won't compile with -std=c++0x
- From: "pberuto at yahoo dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 23 Apr 2013 10:29:47 +0000
- Subject: [Bug c++/57044] New: The following code won't compile with -std=c++0x
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57044
Bug #: 57044
Summary: The following code won't compile with -std=c++0x
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: pberuto@yahoo.com
The following code causes a GCC internal error Segmentation fault:
class myclass
{
public:
template<typename T_>
inline explicit myclass(T_ *s)
{
char buf[mylib::someclass::some_const]; // this line causes the fault
// ... do something useful with buf
}
...
};
// somewhere else:
nemaspace mylib
{
class someclass
{
public:
static const uint32_t some_const;
}
}
// other info:
all GCC versions from 4.5.3 and below compile that code fine. Not tested with
other gcc versions before 4.7.2.
compile flags are CXXFLAGS="-g -O0 -pipe -std=c++0x"
Thank you.