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: Mark Wielaard <mjw at redhat dot com>
- To: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>
- Cc: "'Doug Evans'" <dje at google dot com>, "'gdb-patches'" <gdb-patches at sourceware dot org>
- Date: Mon, 16 Feb 2015 11:57:40 +0100
- 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> <CADPb22TgZAEhxj+A_6OS4M-n1sD8U4cbSs2Eiyx9reHWTW=L9g at mail dot gmail dot com> <000601d04718$d7732860$86597920$ at muller@ics-cnrs.unistra.fr>
On Fri, 2015-02-13 at 00:08 +0100, Pierre Muller wrote:
> My knowledge of C++ is less than minimal,
> for those who don't remember:
> I basically learned C in GDB sources to be able to
> add and maintain pascal language support,
> which is of course my language of predilection...
>
> Just to explain that I do not know what the default
> Boolean type is for C++.
The default C++ boolean type is bool. The C99 boolean type is _Bool.
Earlier C versions don't have a standard boolean type, but old practice
in gdb was to use int. Now you always just #include <stdbool.h> which
defines true, false and the right typedef for bool for C (and does
nothing for C++). So you should only see 'bool' used.
> Anyhow, I suppose that we can safely accept Mark's
> patch regarding the false and true rule removal
Thanks, pushed.
Cheers,
Mark