@TodePond one word style rules them all
Notices by aks (sqx@mastodon.social)
-
Embed this notice
aks (sqx@mastodon.social)'s status on Thursday, 14-Nov-2024 20:04:19 JST aks -
Embed this notice
aks (sqx@mastodon.social)'s status on Sunday, 10-Nov-2024 07:25:31 JST aks @pinskia (NOTE: I untagged Elissa because she has since deleted the thread). I get the same result with that exact code, but in my case the RHS was inside a function call, and then both gcc and clang are silent about it, even with -fsanitize=undefined. So the code in the image doesn't warn me in gcc/clang, but if you change #if 0 to #if 1 it does
-
Embed this notice
aks (sqx@mastodon.social)'s status on Sunday, 10-Nov-2024 06:54:13 JST aks @vampiress I stubbed my toe on a text book variant of this very recently where I simply had to duplicate the top stack element, like:
stack[stack_height++] = stack[stack_height-1];
The RHS was "hidden" behind a function call which made it slightly harder to see straight away. I didn't see the bug until I tried compiling it on clang instead of gcc.
So.. I'm half-seriously looking into Ada now :-) (also because it's not the only recent disappointment I've had with C)