You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In all.sh, we do most builds with gcc -Wall -Wextra or clang -Wall -Wextra, sometimes a few more flags from CMakeLists.txt when doing a CMake build (depending on the build type — IIRC Check is stricter than Asan). We should enable more flags, to catch buggy or non-portable code. In particular:
-std=c99 -pedantic
-Wwrite-strings
-Wlogical-op
-Wshadow
-Wformat-signedness -Wformat-overflow=2 -Wformat-truncation, maybe other printf flags
This would haved allowed us to catch bugs such as #9311 (discussion).
We should also use newer compilers, but that's out of scope here.
The text was updated successfully, but these errors were encountered:
In
all.sh
, we do most builds withgcc -Wall -Wextra
orclang -Wall -Wextra
, sometimes a few more flags fromCMakeLists.txt
when doing a CMake build (depending on the build type — IIRCCheck
is stricter thanAsan
). We should enable more flags, to catch buggy or non-portable code. In particular:-std=c99 -pedantic
-Wwrite-strings
-Wlogical-op
-Wshadow
-Wformat-signedness -Wformat-overflow=2 -Wformat-truncation
, maybe other printf flagsThis would haved allowed us to catch bugs such as #9311 (discussion).
We should also use newer compilers, but that's out of scope here.
The text was updated successfully, but these errors were encountered: