Skip to content

Commit

Permalink
Unconditionally add -Wextra GCC/Clang option and remove GCC_WEXTRA macro
Browse files Browse the repository at this point in the history
  • Loading branch information
royhills committed Aug 26, 2024
1 parent 3d7dff9 commit 44b6876
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 21 deletions.
9 changes: 9 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2024-08-26 Roy Hills <royhills@hotmail.com>

* configure.ac: Unconditionally add -Wextra to GCC and Clang compiler
options instead of using the GCC_WEXTRA macro. -Wextra was added in
GCC 3.4.0, which is 20 years old now, and has always been supported
by Clang. There are no supported systems with earlier GCC versions.

* m4/gcc-wextra.m4: Removed.

2024-08-14 Roy Hills <royhills@hotmail.com>

* get-iab: removed. This script is no longer needed and was depreciated
Expand Down
8 changes: 5 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,19 @@ AC_ARG_ENABLE(gcov,
AC_MSG_RESULT(no)
] )

# Checks for programs.
# Check for utility programs that we need.
AC_PROG_SED
AC_PROG_CC
# Ensure the C compiler supports the C99 standard.
if test "x$ac_cv_prog_cc_c99" = "xno"; then
AC_MSG_ERROR([C compiler does not support C99 standard])
fi
# Add additional options if the C compiler identifies as GCC.
# This applies to Clang/LLVM in addition to GCC.
if test -n "$GCC"; then
AC_DEFINE([ATTRIBUTE_UNUSED], [__attribute__ ((__unused__))],
[Define to the compiler's unused pragma])
CFLAGS="$CFLAGS -Wall -Wshadow -Wwrite-strings"
GCC_WEXTRA
CFLAGS="$CFLAGS -Wall -Wextra -Wshadow -Wwrite-strings"
GCC_STACK_PROTECT_CC
GCC_FORTIFY_SOURCE
GCC_FORMAT_SECURITY
Expand Down
18 changes: 0 additions & 18 deletions m4/gcc-wextra.m4

This file was deleted.

0 comments on commit 44b6876

Please sign in to comment.