This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Merge GCC producer parsers. Allow digits in identifiers.
- From: Patrick Palka <patrick at parcs dot ath dot cx>
- To: Mark Wielaard <mjw at redhat dot com>
- Cc: Joel Brobecker <brobecker at adacore dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 10 Feb 2015 18:15:44 -0500
- Subject: Re: [PATCH] Merge GCC producer parsers. Allow digits in identifiers.
- Authentication-results: sourceware.org; auth=none
- References: <1422185341-20243-1-git-send-email-mjw at redhat dot com> <20150129080018 dot GH5193 at adacore dot com> <1422535409 dot 4947 dot 5 dot camel at bordewijk dot wildebeest dot org> <1423070384 dot 4947 dot 47 dot camel at bordewijk dot wildebeest dot org> <20150204180550 dot GC4738 at adacore dot com> <1423079956 dot 4947 dot 52 dot camel at bordewijk dot wildebeest dot org> <1423600163 dot 4947 dot 86 dot camel at bordewijk dot wildebeest dot org>
On Tue, Feb 10, 2015 at 3:29 PM, Mark Wielaard <mjw@redhat.com> wrote:
> On Wed, 2015-02-04 at 20:59 +0100, Mark Wielaard wrote:
>> On Wed, 2015-02-04 at 22:05 +0400, Joel Brobecker wrote:
>> > > How about the following cleanup:
>> > >
>> > > Change producer_is_gcc function return type to bool.
>> > >
>> > > gdb/ChangeLog:
>> > >
>> > > * utils.h (producer_is_gcc): Change return type to bool. Add major
>> > > argument.
>> > > * utils.c (producer_is_gcc): Likewise.
>> > > (producer_is_gcc_ge_4): Adjust producer_is_gcc call.
>> > > * dwarf2read.c (check_producer): Likewise.
>> >
>> > It looks really great, thanks for doing that!
>> >
>> > I have few very minor nits to report (see below), and also I'm wincing
>> > a bit at the use of type bool. This is the first use in GDB, and
>> > while I don't see that as a problem, and will pre-approve this patch,
>> > let's have this patch sit for a week to give people the opportunity
>> > to comment before we push it.
>>
>> OK. I added the 3 empty lines (don't want ARI yelling at me) and will
>> push next week.
>
> I pushed this now.
>
> Thanks,
>
> Mark
Now that producer_is_gcc() returns a bool, shouldn't the statement
'return -1' become 'return false;', and the statement 'return major;'
become 'return true;'?
As it stands the function now always returns true since both
'(bool)-1' and '(bool)major' evaluate to true, I think.