From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA] Add support for __VA_OPT__
Date: Wed, 27 Sep 2017 11:32:00 -0000 [thread overview]
Message-ID: <0a673716-9823-1dcd-24e1-7b57dd21bc4d@redhat.com> (raw)
In-Reply-To: <87fubei0a4.fsf@tromey.com>
On 09/23/2017 04:03 AM, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
>
>>> But I wonder if gdb should just error() on the invalid ones.
>>> My first thought was no, why make life harder -- but at the same time,
>>> the invalid cases really aren't that useful either.
>
> Pedro> Yeah, error might be better - e.g., for someone trying
> Pedro> to write a "macro define" interactively (without
> Pedro> going via the compiler first), and puzzling about why it
> Pedro> doesn't exactly work [due to some typo]. But we can
> Pedro> decide to do that incrementally. Fine with me to push
> Pedro> as is if you'd like.
>
> I've switched it; and good thing, too, because this caught a bug in the
> previous patch that could cause an infinite loop.
>
Nice. Patch looks good. Please push.
> + /* Whether the loop should keep going. */
> + bool keep_going = true;
'keep_going' doesn't appear used after the loop. Could it be
declared in the for's init statement ?
for (bool keep_going = true;
keep_going;
...
> +
> + for (;
> + keep_going;
> + get_next_token_for_substitution (&replacement_list,
> + &tok,
> + &original_rl_start,
> + &lookahead,
> + &lookahead_rl_start,
> + &lookahead_valid,
> + &keep_going))
> {
Thanks,
Pedro Alves
next prev parent reply other threads:[~2017-09-27 11:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-18 2:42 Tom Tromey
2017-09-20 16:43 ` Pedro Alves
2017-09-21 3:42 ` Tom Tromey
2017-09-21 9:01 ` Pedro Alves
2017-09-23 3:03 ` Tom Tromey
2017-09-27 11:32 ` Pedro Alves [this message]
2017-09-27 14:19 ` Tom Tromey
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=0a673716-9823-1dcd-24e1-7b57dd21bc4d@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tom@tromey.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