This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] Merge GCC producer parsers. Allow digits in identifiers.
- From: Mark Wielaard <mjw at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 29 Jan 2015 13:43:29 +0100
- 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>
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.