aboutsummaryrefslogtreecommitdiff
path: root/gdb/contrib
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@adacore.com>2015-03-02 06:05:01 -0800
committerJoel Brobecker <brobecker@adacore.com>2015-03-02 06:05:01 -0800
commit00e474c2e96f9a56f128ee29fbdc36ac32d5e14a (patch)
tree2492e803467370dd1f597c6a88140e1ff0b2b1c3 /gdb/contrib
parentcc7039d31aefe14a31b5b6d8d3694e32bc22b486 (diff)
downloadbinutils-00e474c2e96f9a56f128ee29fbdc36ac32d5e14a.zip
binutils-00e474c2e96f9a56f128ee29fbdc36ac32d5e14a.tar.gz
binutils-00e474c2e96f9a56f128ee29fbdc36ac32d5e14a.tar.bz2
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".
Diffstat (limited to 'gdb/contrib')
-rw-r--r--gdb/contrib/ari/gdb_ari.sh20
1 files changed, 20 insertions, 0 deletions
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