3 ms·
It does make a difference for some unknown reason. :) > However, using the Linux system for Windows 10, the same code would seg fault. In fact, if you didn’t s
by archgoon 7y ago
It does make a difference for some unknown reason. :)
> However, using the Linux system for Windows 10, the same code would seg fault. In fact, if you didn’t set the gcc -O2 option, the other examples would seg fault, too.
- dragontamer 7y agoStrangely enough, it works with -O2. There's clearly some kind of undefined-behavior going on (that depends on the optimizer!), since the code doesn't work with -O0.