79641461

Date: 2025-05-28 03:28:31
Score: 0.5
Natty:
Report link

Use the gcc attribute to keep constructors alive. This is what i'm using, there might be a better way than even this.

A* a = nullptr;
// gcc constructor to get the
// A instance created unconditionally.
__attribute__((constructor)) void __init_data() {
    a = new A();
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: niteris