diff mbox

[RFA] Allow use of ATTRIBUTE_UNUSED in gdb

Message ID 1468597418-28043-1-git-send-email-tom@tromey.com
State New
Headers show

Commit Message

Tom Tromey July 15, 2016, 3:43 p.m. UTC
Recently gdb was changed to add a few uses of ATTRIBUTE_UNUSED.  This
is useful for -Wunused-but-set-variable, among other things.  This
patch changes ARI to allow these uses.

Tested by re-running ARI locally.

2016-07-15  Tom Tromey  <tom@tromey.com>

	* contrib/ari/gdb_ari.sh: Remove ATTRIBUTE_UNUSED rule.
---
 gdb/ChangeLog              |  4 ++++
 gdb/contrib/ari/gdb_ari.sh | 11 -----------
 2 files changed, 4 insertions(+), 11 deletions(-)
diff mbox

Patch

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6c187dc..c10b9b3 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,7 @@ 
+2016-07-15  Tom Tromey  <tom@tromey.com>
+
+	* contrib/ari/gdb_ari.sh: Remove ATTRIBUTE_UNUSED rule.
+
 2016-07-15  John Baldwin  <jhb@FreeBSD.org>
 
 	* common/signals.c (gdb_signal_from_host): Handle SIGLIBRT.
diff --git a/gdb/contrib/ari/gdb_ari.sh b/gdb/contrib/ari/gdb_ari.sh
index 43f0206..3670624 100644
--- a/gdb/contrib/ari/gdb_ari.sh
+++ b/gdb/contrib/ari/gdb_ari.sh
@@ -620,17 +620,6 @@  Do not use `long long'\'', instead use LONGEST"
     fail("long long")
 }
 
-BEGIN { doc["ATTRIBUTE_UNUSED"] = "\
-Do not use ATTRIBUTE_UNUSED, do not bother (GDB is compiled with -Werror and, \
-consequently, is not able to tolerate false warnings.  Since -Wunused-param \
-produces such warnings, neither that warning flag nor ATTRIBUTE_UNUSED \
-are used by GDB"
-    category["ATTRIBUTE_UNUSED"] = ari_regression
-}
-/(^|[^_[:alnum:]])ATTRIBUTE_UNUSED([^_[:alnum:]]|$)/ {
-    fail("ATTRIBUTE_UNUSED")
-}
-
 BEGIN { doc["ATTR_FORMAT"] = "\
 Do not use ATTR_FORMAT, use ATTRIBUTE_PRINTF instead"
     category["ATTR_FORMAT"] = ari_regression