Remove C-specific warnings from common warning set
authorPedro Alves <palves@redhat.com>
Sat, 28 Feb 2015 19:11:10 +0000 (19:11 +0000)
committerPedro Alves <palves@redhat.com>
Sat, 7 Mar 2015 18:00:15 +0000 (18:00 +0000)
Whoops, these are C specific, but I somehow missed the warnings before:

  cc1plus: warning: command line option ‘-Wmissing-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
  cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++ [enabled by default]
  cc1plus: warning: command line option ‘-Wmissing-parameter-type’ is valid for C/ObjC but not for C++ [enabled by default]
  cc1plus: warning: command line option ‘-Wold-style-declaration’ is valid for C/ObjC but not for C++ [enabled by default]
  cc1plus: warning: command line option ‘-Wold-style-definition’ is valid for C/ObjC but not for C++ [enabled by default]

gdb/ChangeLog:
2015-03-07  Pedro Alves  <palves@redhat.com>

* configure.ac (build_warnings): Move -Wmissing-prototypes
-Wdeclaration-after-statement -Wmissing-parameter-type
-Wold-style-declaration -Wold-style-definition to the C-specific
set.
* configure: Regenerate.

gdb/gdbserver/ChangeLog:
2015-03-07  Pedro Alves  <palves@redhat.com>

* configure.ac (build_warnings): Move
-Wdeclaration-after-statement to the C-specific set.
* configure: Regenerate.

gdb/ChangeLog
gdb/configure
gdb/configure.ac
gdb/gdbserver/ChangeLog
gdb/gdbserver/configure
gdb/gdbserver/configure.ac

index 522f2bb4cda60e1437866f7cc0a99edb34f8520e..eee5badd296df81945af6f6b381670af801b3faf 100644 (file)
@@ -1,3 +1,11 @@
+2015-03-07  Pedro Alves  <palves@redhat.com>
+
+       * configure.ac (build_warnings): Move -Wmissing-prototypes
+       -Wdeclaration-after-statement -Wmissing-parameter-type
+       -Wold-style-declaration -Wold-style-definition to the C-specific
+       set.
+       * configure: Regenerate.
+
 2015-03-07  Pedro Alves  <palves@redhat.com>
 
        * common/gdb_socket.h: New file.
index 3297d37c5f067e8641f301ba378591f7c3f56fa2..1ddcc62ab8f44109659a051283b54be5bc7da211 100755 (executable)
@@ -13383,18 +13383,19 @@ if test "${ERROR_ON_WARNING}" = yes ; then
 fi
 
 # These options work in either C or C++ modes.
-build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
+build_warnings="-Wall -Wpointer-arith \
 -Wno-unused -Wunused-value -Wunused-function \
--Wno-switch -Wno-char-subscripts -Wmissing-prototypes \
--Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
--Wold-style-declaration -Wold-style-definition"
+-Wno-switch -Wno-char-subscripts \
+-Wempty-body"
 
 # Now add in C and C++ specific options, depending on mode.
 if test "$enable_build_with_cxx" = "yes"; then
    build_warnings="$build_warnings -Wno-sign-compare -Wno-write-strings \
 -Wno-narrowing"
 else
-   build_warnings="$build_warnings -Wpointer-sign"
+   build_warnings="$build_warnings -Wpointer-sign -Wmissing-prototypes \
+-Wdeclaration-after-statement -Wmissing-parameter-type \
+-Wold-style-declaration -Wold-style-definition"
 fi
 
 # Enable -Wno-format by default when using gcc on mingw since many
index 0898d0e1452f5116e716227e069719a900d4abc7..a4886c93ed16e16eeb4df6146cbbc207470a9b82 100644 (file)
@@ -1978,18 +1978,19 @@ if test "${ERROR_ON_WARNING}" = yes ; then
 fi
 
 # These options work in either C or C++ modes.
-build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
+build_warnings="-Wall -Wpointer-arith \
 -Wno-unused -Wunused-value -Wunused-function \
--Wno-switch -Wno-char-subscripts -Wmissing-prototypes \
--Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type \
--Wold-style-declaration -Wold-style-definition"
+-Wno-switch -Wno-char-subscripts \
+-Wempty-body"
 
 # Now add in C and C++ specific options, depending on mode.
 if test "$enable_build_with_cxx" = "yes"; then
    build_warnings="$build_warnings -Wno-sign-compare -Wno-write-strings \
 -Wno-narrowing"
 else
-   build_warnings="$build_warnings -Wpointer-sign"
+   build_warnings="$build_warnings -Wpointer-sign -Wmissing-prototypes \
+-Wdeclaration-after-statement -Wmissing-parameter-type \
+-Wold-style-declaration -Wold-style-definition"
 fi
 
 # Enable -Wno-format by default when using gcc on mingw since many
index 8aa38a301b810687de793bce8f3cd978d1a9c1cc..b27090ee9a2501f2827743622e7ee284e939892b 100644 (file)
@@ -1,3 +1,9 @@
+2015-03-07  Pedro Alves  <palves@redhat.com>
+
+       * configure.ac (build_warnings): Move
+       -Wdeclaration-after-statement to the C-specific set.
+       * configure: Regenerate.
+
 2015-03-07  Pedro Alves  <palves@redhat.com>
 
        * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
index a14def95ac7c80e003cd73caf5d27fe5f8a7fbe9..cbf4b4ebf41949e0458e720e1b8d1c661b619ff5 100755 (executable)
@@ -5794,13 +5794,15 @@ if test "${ERROR_ON_WARNING}" = yes ; then
     WERROR_CFLAGS="-Werror"
 fi
 
-build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
+build_warnings="-Wall -Wpointer-arith \
 -Wformat-nonliteral -Wno-char-subscripts -Wempty-body"
 
 # Now add in C and C++ specific options, depending on mode.
 if test "$enable_build_with_cxx" = "yes"; then
    build_warnings="$build_warnings -Wno-sign-compare -Wno-write-strings \
 -Wno-narrowing"
+else
+   build_warnings="$build_warnings -Wdeclaration-after-statement"
 fi
 
 # The set of warnings supported by a C++ compiler is not the same as
index cefc69e3cec8e7d1723d266e92a60653fb550162..0381aa986df9e851c77aafd2d64a3f77afd06590 100644 (file)
@@ -167,13 +167,15 @@ if test "${ERROR_ON_WARNING}" = yes ; then
     WERROR_CFLAGS="-Werror"
 fi
 
-build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
+build_warnings="-Wall -Wpointer-arith \
 -Wformat-nonliteral -Wno-char-subscripts -Wempty-body"
 
 # Now add in C and C++ specific options, depending on mode.
 if test "$enable_build_with_cxx" = "yes"; then
    build_warnings="$build_warnings -Wno-sign-compare -Wno-write-strings \
 -Wno-narrowing"
+else
+   build_warnings="$build_warnings -Wdeclaration-after-statement"
 fi
 
 # The set of warnings supported by a C++ compiler is not the same as
This page took 0.043313 seconds and 4 git commands to generate.