This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb] ARI: Remove true/false checks
- From: Pedro Alves <palves at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 13 Oct 2016 17:24:59 -0000
- Subject: [binutils-gdb] ARI: Remove true/false checks
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1f2e9c5e3b0ef55cb0ab180dd0c82c7954a73e1a
commit 1f2e9c5e3b0ef55cb0ab180dd0c82c7954a73e1a
Author: Pedro Alves <palves@redhat.com>
Date: Thu Oct 13 17:59:26 2016 +0100
ARI: Remove true/false checks
These don't make sense with C++.
gdb/ChangeLog:
2016-10-13 Pedro Alves <palves@redhat.com>
* contrib/ari/gdb_ari.sh (boolean): Suggest bool instead.
(false, true): Remove checks.
Diff:
---
gdb/ChangeLog | 5 +++++
gdb/contrib/ari/gdb_ari.sh | 22 +---------------------
2 files changed, 6 insertions(+), 21 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0efe9c1..57fdc64 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2016-10-13 Pedro Alves <palves@redhat.com>
+
+ * contrib/ari/gdb_ari.sh (boolean): Suggest bool instead.
+ (false, true): Remove checks.
+
2016-10-12 Tom Tromey <tom@tromey.com>
* machoread.c (macho_symfile_read_all_oso): Use std::string.
diff --git a/gdb/contrib/ari/gdb_ari.sh b/gdb/contrib/ari/gdb_ari.sh
old mode 100644
new mode 100755
index 43f0206..7e639e3
--- a/gdb/contrib/ari/gdb_ari.sh
+++ b/gdb/contrib/ari/gdb_ari.sh
@@ -1136,7 +1136,7 @@ Do not use strnicmp(), instead use strncasecmp()"
# Boolean expressions and conditionals
BEGIN { doc["boolean"] = "\
-Do not use `boolean'\'', use `int'\'' instead"
+Do not use `boolean'\'', use `bool'\'' instead"
category["boolean"] = ari_regression
}
/(^|[^_[:alnum:]])boolean([^_[:alnum:]]|$)/ {
@@ -1145,26 +1145,6 @@ 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