This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Merge GCC producer parsers. Allow digits in identifiers.


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]