Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Wielaard <mjw@redhat.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] Merge GCC producer parsers. Allow digits in identifiers.
Date: Thu, 29 Jan 2015 16:28:00 -0000	[thread overview]
Message-ID: <1422535409.4947.5.camel@bordewijk.wildebeest.org> (raw)
In-Reply-To: <20150129080018.GH5193@adacore.com>

On Thu, 2015-01-29 at 12:00 +0400, Joel Brobecker wrote:
> Looking at the function, it seems to me that the current design of
> the function is a little strange: Named "producer_is_gcc", it'd expect
> the return value to be a boolean. So, if the function returned that
> and had an extra parameter for getting the major, the issue would
> not arise:
> 
>         else if (producer_is_gcc (cu->producer, &major, &minor))
> 
> I think you chose this approach out of consistency with
> producer_is_gcc_ge_4, which is why I'm OK with the current patch.
> But if I were to look into this, what I would do replace the two
> calls to this function with calls to your new function.
> 
> I might also allow major/minor to be NULL to spare users the need
> to create variables that they will not need afterwards.
> 
> So, to sumarize, push as is, and then let's clean this up (you don't
> have to do the cleanup, if you don't want to, but let me know if you
> pass, as I'd like to take over if you do).

Thanks, I pushed as is. You observations are correct.
I'll refactor this as you suggest in a separate patch.


  reply	other threads:[~2015-01-29 12:43 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 [this message]
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
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=1422535409.4947.5.camel@bordewijk.wildebeest.org \
    --to=mjw@redhat.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /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