3 ms·
Precisely the issue, very easy to miss, still compiles, looks normal.
by theonewolf 13y ago
Precisely the issue, very easy to miss, still compiles, looks normal.
- _ZeD_ 13y ago$ echo $CFLAGS -Werror -Wall -Wextra -Wold-style-definition -Wmissing-declarations -Wredundant-decls -Wmissing-noreturn -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Winline -Wformat-nonliteral -Wformat-security -Wswitch-enum -Wswitch-default -Winit-self -Wmissing-include-dirs -Wundef -Waggregate-return -Wmissing-format-attribute -Wnested-externs -std=c11 -pedantic
- theonewolf 13y agoNice safer CFLAGS :-) But yeah, that's why this is a "brain teaser" rather than a "compiler teaser." It's not that it _can't_ be caught with a compiler, just that it's easy to miss and acceptable to compilers with default flags.