Skip to content

Commit

Permalink
missing-variable-declarations only is valid for C/ObjC, not C++ (#5867)
Browse files Browse the repository at this point in the history
Also, fix an incorrect comment
  • Loading branch information
dimpase authored and fingolfin committed Jan 17, 2025
1 parent eeba5ab commit 0b66f0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cnf/m4/ax_compiler_flags_cflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ AC_DEFUN([AX_COMPILER_WARNING_FLAGS],[
-Wmissing-format-attribute dnl
-Wmissing-include-dirs dnl
dnl -Wmissing-noreturn dnl
-Wmissing-variable-declarations dnl
-Wno-pragmas dnl # for GCC and the ObjFunc typedef
dnl -Wnull-dereference dnl
-Wpacked dnl
Expand All @@ -123,7 +122,7 @@ AC_DEFUN([AX_COMPILER_WARNING_FLAGS],[
# accept similar warnings flags.
AS_VAR_SET(ax_warn_cxxflags_variable,[$ax_warn_cflags_variable])
# Test for warnings that only work in C++, not in C
# Test for warnings that only work in C, not in C++
if test "$ax_compiler_cxx" = "no" ; then
AX_APPEND_COMPILE_FLAGS([ dnl
dnl -Wdeclaration-after-statement dnl
Expand All @@ -134,6 +133,7 @@ AC_DEFUN([AX_COMPILER_WARNING_FLAGS],[
-Wnested-externs dnl
-Wold-style-definition dnl
-Wstrict-prototypes dnl
-Wmissing-variable-declarations dnl
],ax_warn_cflags_variable,[$ax_compiler_flags_test])
fi
Expand Down

0 comments on commit 0b66f0d

Please sign in to comment.