Skip to content

Commit

Permalink
document clang 16+ suppressions
Browse files Browse the repository at this point in the history
-Wunsafe-buffer-usage is useless for C code, as it complains
about essentially every use of pointers.

-Wcast-function-type-strict complains about casting functions
which take (void*) to functions which take a typed pointer.  This
pattern is used extensively in the dlist wrappers.

-Wreserved-identifier complains about identifiers which begin
with "_".  This is used all over the place in our code, but is
generally forbidden in C.

-Wc2x-extensions complains about initializers like "foo = {}"
which is fine, but which isn't C99.

-Wextra-semi-stmt complains about ";;" at the end of lines.
Our code is clean, but some system header files are crap.
  • Loading branch information
alandekok committed Nov 19, 2023
1 parent 770c10e commit c827d4c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Make.inc.in
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ INSTALL_DATA = ${INSTALL} -m 644
INSTALL_SCRIPT = ${INSTALL_PROGRAM}
INSTALLSTRIP = @INSTALLSTRIP@

#
# For clang16+. Shut up a bunch of C++ complaints which are fine for C.b
#
# CFLAGS += -Wno-reserved-identifier -Wno-c2x-extensions -Wno-cast-function-type-strict -Wno-extra-semi-stmt -Wno-unsafe-buffer-usage

#
# Linker arguments for libraries searched for by the main
# configure script.
Expand Down

0 comments on commit c827d4c

Please sign in to comment.