This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Remove true and false ARI checks now that we use stdbool.h.
- From: Doug Evans <dje at google dot com>
- To: Mark Wielaard <mjw at redhat dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>, muller at sourceware dot org
- Date: Thu, 12 Feb 2015 12:03:57 -0800
- Subject: Re: [PATCH] Remove true and false ARI checks now that we use stdbool.h.
- Authentication-results: sourceware.org; auth=none
- References: <1423756577-10959-1-git-send-email-mjw at redhat dot com>
On Thu, Feb 12, 2015 at 7:56 AM, Mark Wielaard <mjw@redhat.com> wrote:
> I saw new ari warnings related to the usage of true and false in
> utils.c (producer_is_gcc). Since we now use stdbool.h (and might switch to
> C++ soon) usage of true and false is obviously fine. Remove these checks.
>
> gdb/ChangeLog:
>
> * contrib/ari/gdb_ari.sh: Remove checks for "true" and "false".
> ---
> diff --git a/gdb/contrib/ari/gdb_ari.sh b/gdb/contrib/ari/gdb_ari.sh
> index b868a17..52d8ab1 100644
> --- a/gdb/contrib/ari/gdb_ari.sh
> +++ b/gdb/contrib/ari/gdb_ari.sh
> @@ -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
Fine by me.
CC'ing Pierre (ARI maintainer) in case I missed something.
Regarding the "boolean" check (immediately preceeding false/true).
It currently says "use int instead".
Should we change that to bool?