4 ms·
1. Is what gets in my way the most when writing C. The whole undefined behaviour story is a wreck. Not hugely relevant but zero initialised globals don't imply
by JonChesterfield 2y ago
1. Is what gets in my way the most when writing C. The whole undefined behaviour story is a wreck.
Not hugely relevant but zero initialised globals don't imply code inserted before main. They get allocated at link time into a continuous blob which is zeroed by the loader. Non-zero values take up space in the binary but also involve no code generation. Global constructors, C++ style, usually do involve walking an array of function pointers before main though.