------- Comment #11 from jakub at gcc dot gnu dot org 2010-09-09 10:28 -------
template<typename T>
struct Singleton
{
static T* get()
{
static T instance;
return &instance;
}
~Singleton() {}
};
struct Foo : Singleton<Foo>
{
};
#ifdef __ARM_EABI__
typedef int __guard;
#else
typedef int __guard __attribute__((mode(DI)));
#endif
extern "C" int __cxa_guard_acquire(__guard *)
{
}
extern "C" void __cxa_guard_release(__guard *) throw()
{
}
extern "C" void __cxa_guard_abort(__guard *) throw()
{
}
void foo()
{
Foo::get();
}
compiles just fine.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45603