Skip to content

Commit

Permalink
autogen.sh: CFLAGS: Add some -Werror=... flags that will be default soon
Browse files Browse the repository at this point in the history
Clang 16 and GCC 14 have upgraded several warnings to errors by default.
Also, there are new warnings that will be requirements of ISO C23.  Add
all of those to our build.

Use Clang's -Wno-unknown-attribute-option, to ignore warnings that are
exclusive of GCC.  Sadly, GCC doesn't have such an option.

Link: <https://wiki.gentoo.org/wiki/Modern_C_porting#What_changed.3F>
Link: <#922>
Suggested-by: Sam James <[email protected]>
Signed-off-by: Alejandro Colomar <[email protected]>
  • Loading branch information
alejandro-colomar authored and ikerexxe committed Jan 26, 2024
1 parent d452d1b commit d74ffd3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ CFLAGS="-O2"
CFLAGS="$CFLAGS -Wall"
CFLAGS="$CFLAGS -Wextra"
CFLAGS="$CFLAGS -Werror=implicit-function-declaration"
CFLAGS="$CFLAGS -Werror=implicit-int"
CFLAGS="$CFLAGS -Werror=incompatible-pointer-types"
CFLAGS="$CFLAGS -Werror=int-conversion"
CFLAGS="$CFLAGS -Wno-expansion-to-defined"
CFLAGS="$CFLAGS -Wno-unknown-warning-option"

"$(dirname "$0")"/configure \
CFLAGS="$CFLAGS" \
Expand Down

0 comments on commit d74ffd3

Please sign in to comment.