Re: New ARI warning Wed May 23 01:55:03 UTC 2012

Joel Brobecker
2012-06-22T17:31:19Z

[-- Attachment #1: Type: text/plain, Size: 280 bytes --]

(deep breath...)

> Tested on x86_64-linux by rebuilding the native compiler with
> --enable-targets=all.
>
> gdb/ChangeLog:
>
> * configure.ac (build_warnings): Add -Wdeclaration-after-statement.
> * configure: Regenerate.

Patch attached, this time.

--
Joel

[-- Attachment #2: 0001-Add-Wdeclaration-after-statement-to-list-of-compiler.patch --]
[-- Type: text/x-diff, Size: 1598 bytes --]

From 6dd065b6a22bab9c916ce716faf005ce368c2d8e Mon Sep 17 00:00:00 2001
From: Joel Brobecker <brobecker@adacore.com>
Date: Fri, 22 Jun 2012 10:15:53 -0700
Subject: [PATCH] Add -Wdeclaration-after-statement to list of compiler warnings

gdb/ChangeLog:

* configure.ac (build_warnings): Add -Wdeclaration-after-statement.
* configure: Regenerate.
---
gdb/configure | 3 ++-
gdb/configure.ac | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/gdb/configure b/gdb/configure
index 1ea4ee9..b0b5d11 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -12386,7 +12386,8 @@ fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wformat-nonliteral -Wno-pointer-sign \
-Wno-unused -Wunused-value -Wunused-function \
--Wno-switch -Wno-char-subscripts -Wmissing-prototypes"
+-Wno-switch -Wno-char-subscripts -Wmissing-prototypes \
+-Wdeclaration-after-statement"

# Enable -Wno-format by default when using gcc on mingw since many
# GCC versions complain about %I64.
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 5771825..3fdeb89 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1867,7 +1867,8 @@ fi
build_warnings="-Wall -Wdeclaration-after-statement -Wpointer-arith \
-Wformat-nonliteral -Wno-pointer-sign \
-Wno-unused -Wunused-value -Wunused-function \
--Wno-switch -Wno-char-subscripts -Wmissing-prototypes"
+-Wno-switch -Wno-char-subscripts -Wmissing-prototypes \
+-Wdeclaration-after-statement"

# Enable -Wno-format by default when using gcc on mingw since many
# GCC versions complain about %I64.
--
1.7.1