From d7144b2fa40b1be59e6250313c5e5f1a2bd8fb25 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Tue, 16 Jul 2019 03:49:50 -0500 Subject: Restored warnings for older gcc so jam can continue to creak along. --- config/gnu-flags | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/config/gnu-flags b/config/gnu-flags index 9b61907..ae8ddb0 100644 --- a/config/gnu-flags +++ b/config/gnu-flags @@ -174,7 +174,6 @@ if test "X-gcc" = "X-$cc_vendor"; then H5_CFLAGS="$H5_CFLAGS -Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wpacked" H5_CFLAGS="$H5_CFLAGS -Wredundant-decls -Wshadow -Wstrict-prototypes -Wswitch-enum -Wswitch-default" H5_CFLAGS="$H5_CFLAGS -Wundef -Wunused-macros -Wunsafe-loop-optimizations -Wwrite-strings" - H5_CFLAGS="$H5_CFLAGS -Wlogical-op -Wlarger-than=2560" ###################### # Developer warnings # @@ -194,6 +193,12 @@ if test "X-gcc" = "X-$cc_vendor"; then H5_CFLAGS="$H5_CFLAGS -Wno-long-long" fi + # -Wvolatile-register-var was later incorporated into -Wall and + # only needs to be specified explicitly for gcc 4.2-4.3 + if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 2 -o $cc_vers_major -eq 4 -a $$cc_vers_minor -le 3; then + H5_CFLAGS="$H5_CFLAGS -Wvolatile-register-var" + fi + # -Wstrict-aliasing was later incorporated into -Wall and # only needs to be specified explicitly for gcc 4.5-4.6 if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 5 -o $cc_vers_major -eq 4 -a $cc_vers_minor -le 6; then @@ -201,7 +206,7 @@ if test "X-gcc" = "X-$cc_vendor"; then fi # The non-valued form of -Wstrict-overflow is used in gcc 4.2-4.4 - if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 2 -o $cc_vers_major -eq 4 -a $cc_vers_minor -le 4; then + if test $cc_vers_major -eq 4 -a $cc_vers_minor -ge 2 -a $cc_vers_major -eq 4 -a $cc_vers_minor -le 4; then H5_CFLAGS="$H5_CFLAGS -Wstrict-overflow" fi @@ -215,6 +220,11 @@ if test "X-gcc" = "X-$cc_vendor"; then # Version-specific warnings # ############################# + # gcc 4.3 + if test $cc_vers_major -ge 5 -o $cc_vers_major -eq 4 -a $cc_vers_minor -ge 3; then + H5_CFLAGS="$H5_CFLAGS -Wlogical-op -Wlarger-than=2560" + fi + # gcc 4.4 if test $cc_vers_major -ge 5 -o $cc_vers_major -eq 4 -a $cc_vers_minor -ge 4; then H5_CFLAGS="$H5_CFLAGS -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat" -- cgit v0.12