This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Revert "Remove true and false ARI checks now that we use stdbool.h."
- From: Joel Brobecker <brobecke at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 2 Mar 2015 14:06:30 -0000
- Subject: [binutils-gdb] Revert "Remove true and false ARI checks now that we use stdbool.h."
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=00e474c2e96f9a56f128ee29fbdc36ac32d5e14a
commit 00e474c2e96f9a56f128ee29fbdc36ac32d5e14a
Author: Joel Brobecker <brobecker@adacore.com>
Date: Mon Mar 2 06:05:01 2015 -0800
Revert "Remove true and false ARI checks now that we use stdbool.h."
As we cannot use type bool until conversion to C++ is official,
this patch re-instates the ARI checks for "true/false".
gdb/ChangeLog:
* contrib/ari/gdb_ari.sh: Reinstate checks for "true" and "false".
Diff:
---
gdb/ChangeLog | 4 ++++
gdb/contrib/ari/gdb_ari.sh | 20 ++++++++++++++++++++
2 files changed, 24 insertions(+)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 56e7206..922b1d9 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
2015-03-02 Joel Brobecker <brobecker@adacore.com>
+ * contrib/ari/gdb_ari.sh: Reinstate checks for "true" and "false".
+
+2015-03-02 Joel Brobecker <brobecker@adacore.com>
+
* utils.h: Remove <stdbool.h> #include.
(producer_is_gcc): Change return type to "int".
* utils.c (producer_is_gcc): Change return type to int.
diff --git a/gdb/contrib/ari/gdb_ari.sh b/gdb/contrib/ari/gdb_ari.sh
index 52d8ab1..b868a17 100644
--- a/gdb/contrib/ari/gdb_ari.sh
+++ b/gdb/contrib/ari/gdb_ari.sh
@@ -1145,6 +1145,26 @@ Do not use `boolean'\'', use `int'\'' instead"
}
}
+BEGIN { doc["false"] = "\
+Definitely do not use `false'\'' in boolean expressions"
+ category["false"] = ari_regression
+}
+/(^|[^_[:alnum:]])false([^_[:alnum:]]|$)/ {
+ if (is_yacc_or_lex == 0) {
+ fail("false")
+ }
+}
+
+BEGIN { doc["true"] = "\
+Do not try to use `true'\'' in boolean expressions"
+ category["true"] = ari_regression
+}
+/(^|[^_[:alnum:]])true([^_[:alnum:]]|$)/ {
+ if (is_yacc_or_lex == 0) {
+ fail("true")
+ }
+}
+
# Typedefs that are either redundant or can be reduced to `struct
# type *''.
# Must be placed before if assignment otherwise ARI exceptions