Comment

Comment by pjmlp

Now try that with other C compilers as well, or without using static.

Also add common C extensions into the soup like constructor function attributes.

Finally ISO/IEC 9899:2011, section 5.1.2.

"All objects with static storage duration shall be initialized (set to their initial values) before program startup. The manner and timing of such initialization are otherwise unspecified. Program termination returns control to the execution environment."

Don't mix what your compiler does, with what the standard requires.

Doing so only leads to unportable programs and misunderstandings.

parent pjmlp 8 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton