Skip to content

Commit

Permalink
Exclude -Wmisleading-indentation when -save-temps
Browse files Browse the repository at this point in the history
That option may be triggered wrongly by pre-processed files.
  • Loading branch information
nobu committed Sep 6, 2023
1 parent ae96232 commit abd0b9b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion configure.ac
Expand Up @@ -682,6 +682,10 @@ AS_CASE(["$GCC:${warnflags+set}:${extra_warnflags:+set}:"],
AS_IF([test $gcc_major -le 6], [
extra_warnflags="$extra_warnflags -Wno-maybe-uninitialized"
])
AS_CASE([ $CFLAGS ], [*" -save-temps="*|*" -save-temps "*], [], [
extra_warnflags="$extra_warnflags -Werror=misleading-indentation"
])
# ICC doesn't support -Werror=
AS_IF([test $icc_version -gt 0], [
particular_werror_flags=no
Expand All @@ -693,7 +697,6 @@ AS_CASE(["$GCC:${warnflags+set}:${extra_warnflags:+set}:"],
-Werror=duplicated-cond \
-Werror=implicit-function-declaration \
-Werror=implicit-int \
-Werror=misleading-indentation \
-Werror=pointer-arith \
-Werror=shorten-64-to-32 \
-Werror=write-strings \
Expand Down

0 comments on commit abd0b9b

Please sign in to comment.