public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Patrick Palka <patrick@parcs.ath.cx>
To: Mark Wielaard <mjw@redhat.com>
Cc: Joel Brobecker <brobecker@adacore.com>,
		"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [PATCH] Merge GCC producer parsers. Allow digits in identifiers.
Date: Tue, 10 Feb 2015 23:16:00 -0000	[thread overview]
Message-ID: <CA+C-WL-PpwKHDDOic7HfNQygCGM6VjqeZRXVo_ZbNg+w+AmSRA@mail.gmail.com> (raw)
In-Reply-To: <1423600163.4947.86.camel@bordewijk.wildebeest.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.

  reply	other threads:[~2015-02-10 23:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-25 16:32 Mark Wielaard
2015-01-29 15:59 ` Joel Brobecker
2015-01-29 16:28   ` Mark Wielaard
2015-02-04 17:19     ` Mark Wielaard
2015-02-04 18:05       ` Joel Brobecker
2015-02-04 19:59         ` Mark Wielaard
2015-02-10 20:29           ` Mark Wielaard
2015-02-10 23:16             ` Patrick Palka [this message]
2015-02-10 23:51               ` Mark Wielaard

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=CA+C-WL-PpwKHDDOic7HfNQygCGM6VjqeZRXVo_ZbNg+w+AmSRA@mail.gmail.com \
    --to=patrick@parcs.ath.cx \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=mjw@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).