gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

C/C++ > GCC-ARM compiler bug?

#93290 - devmelon - Tue Jul 18, 2006 10:59 am

Hello!

We recently run into a bug when compiling our game through the VisualHAM ide. We had
Code:
std::list<void*> g_list; // Names have been changed to protect the innocent :)
in global namespace and the object doesn't seem to construct somehow. Calls to g_list members will freeze the program, but if created locally, it works fine. Does anyone have any ideas or fixes for this?

#93339 - sajiimori - Tue Jul 18, 2006 6:49 pm

Are you accessing it during the constructor of another global or file-scope object? If so, it might not be constructed yet.

Otherwise, I don't know. Maybe a link script problem.

#94616 - wintermute - Tue Jul 25, 2006 2:56 pm

Which toolchain are you using? Sounds like a global/static constructor issue.
_________________
devkitPro - professional toolchains at amateur prices
devkitPro IRC support
Personal Blog