From: Joel Brobecker <brobecker@adacore.com>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org, Mark Wielaard <mjw@redhat.com>
Subject: Re: [RFA/commit] Remove use of stdbool.h in GDB sources.
Date: Mon, 02 Mar 2015 14:10:00 -0000 [thread overview]
Message-ID: <20150302141037.GA4449@adacore.com> (raw)
In-Reply-To: <54F03DD8.8080902@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 707 bytes --]
> > gdb/ChangeLog:
> >
> > * utils.h: Remove <stdbool.h> #include.
> > (producer_is_gcc): Change return type to "int".
> > * utils.c (producer_is_gcc): Change return type to int.
> > Return 1 instead of true, and 0 instead of false.
> > Adjust function documentation accordingly.
> >
> > I will push this patch in the next few days, unless there are
> > objections.
>
> No objections here.
Thanks, Pedro. I just pushed the patch.
> (guess we should reinstate the ARI bool rule too then.)
Absolutely. Attached is the patch that I just pushed reinstating
them.
gdb/ChangeLog:
* contrib/ari/gdb_ari.sh: Reinstate checks for "true" and "false".
--
Joel
[-- Attachment #2: 0001-Revert-Remove-true-and-false-ARI-checks-now-that-we-.patch --]
[-- Type: text/x-diff, Size: 1917 bytes --]
From 00e474c2e96f9a56f128ee29fbdc36ac32d5e14a Mon Sep 17 00:00:00 2001
From: Joel Brobecker <brobecker@adacore.com>
Date: Mon, 2 Mar 2015 06:05:01 -0800
Subject: [PATCH] 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".
---
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
--
1.9.1
prev parent reply other threads:[~2015-03-02 14:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-27 8:53 Joel Brobecker
2015-02-27 9:50 ` Pedro Alves
2015-03-02 14:10 ` Joel Brobecker [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150302141037.GA4449@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=mjw@redhat.com \
--cc=palves@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox