From: Joel Brobecker Date: Mon, 2 Mar 2015 14:05:01 +0000 (-0800) Subject: Revert "Remove true and false ARI checks now that we use stdbool.h." X-Git-Tag: users/hjl/linux/release/2.25.51.0.2~2^2~36^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=00e474c2e96f9a56f128ee29fbdc36ac32d5e14a;p=thirdparty%2Fbinutils-gdb.git 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 --git a/gdb/ChangeLog b/gdb/ChangeLog index 56e7206dd7b..922b1d9b99e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2015-03-02 Joel Brobecker + + * contrib/ari/gdb_ari.sh: Reinstate checks for "true" and "false". + 2015-03-02 Joel Brobecker * utils.h: Remove #include. diff --git a/gdb/contrib/ari/gdb_ari.sh b/gdb/contrib/ari/gdb_ari.sh index 52d8ab1a08a..b868a17e175 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