So the code mentioned on the topic line causes segmentation fault with Qt 4.8.3 & gcc 4.7.2
This is at outside of any classes/structs at .cpp-file and works with gcc 4.4
const QList<int> warnings = QList<int>() << 0 << 3 << 7;
Traces gives these two hints:
__do_global_ctors()
__static_initialization_and_destruction_0
So it seems that "warning" is not yet available when its inserting latter list into it.
Works with 4.7.2 if i change it into this:
global scope: QList< int> warnings;
This is inisde some function:
warnings = QList<int>() << 0 << 3;
I'm wondering why this happens?
Edit:
I guess i clipped a bit too much stuff out from my question originally, but warnings is supposed to be const at file scope (.cpp-file) for holding bunch enums.