2025-12-03 10:23 UTC
Reminder: whenever you see examples of 'cursed' C or C++, run it built on GCC/Clang with
-Werror -Wall -Wextra -fsanitize=undefined,address
and see how far it gets. These flags should be enabled by default in IDEs, build systems and for testing and development.
Replies (2)
-
@JSAMcFarlane@mastodon.ie 2025-12-03 10:29
The most recent example is https://www.youtube.com/watch?v=zC_uwGqSLqQ which doesn't share the bug but is likely easy to detect: https://godbolt.org/z/MGMdc3EPc
-
@rollbear@fosstodon.org 2025-12-03 11:25
@JSAMcFarlane@mastodon.ie Indeed! I usually also add -Wpedantic to avoid accidental use of extensions, and -Wconversion to catch expensive (or bug prone) hidden conversions. Not applicable to all code. YMMV.