Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Mike Frysinger <vapier@gentoo.org>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2] sim: avoid TRACE redefine warnings
Date: Mon, 22 Mar 2010 22:56:00 -0000	[thread overview]
Message-ID: <e394668d1003221556h14d143adu7f4e80785172cf53@mail.gmail.com> (raw)
In-Reply-To: <20100316160632.GC3830@adacore.com>

On Tue, Mar 16, 2010 at 9:06 AM, Joel Brobecker <brobecker@adacore.com> wrote:
>> 2010-03-15  Mike Frysinger  <vapier@gentoo.org>
>>
>>       * hw-ports.c (TRACE): Delete.
>>       * hw-properties.c (TRACE): Delete.
>>       (hw_find_ihandle_runtime_property): Change TRACE to HW_TRACE.
>>       (hw_find_integer_property): Likewise.
>>       (hw_find_integer_array_property): Likewise.
>>       (hw_add_duplicate_property): Likewise.
>
> This looks good to me. I don't understand why people use two parentheses
> in the call to HW_TRACE:
>
>    HW_TRACE ((me, [...], property))
>
> But it looks like it's the style being used, so OK.

For reference sake,
It's not style, it's correctness.
Having two parens  allows for variadic macros in the absence of
explicit support from the language.

void hw_trace
(struct hw *me,
 const char *fmt,
 ...) __attribute__ ((format (printf, 2, 3)));

#define HW_TRACE(ARGS) \
do { \
  if (hw_trace_p (me)) \
    { \
      hw_trace ARGS; \
    } \
} while (0)


      reply	other threads:[~2010-03-22 22:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-14 20:37 [PATCH] " Mike Frysinger
2010-03-15  0:35 ` Joel Brobecker
2010-03-15  7:18   ` Mike Frysinger
2010-03-15 16:49     ` Joel Brobecker
2010-03-15 18:35       ` Mike Frysinger
2010-03-15  0:43 ` Pedro Alves
2010-03-15  7:18   ` Mike Frysinger
2010-03-15 10:53     ` Matt Rice
2010-03-15 13:03     ` Pedro Alves
2010-03-15 18:47 ` [PATCH v2] " Mike Frysinger
2010-03-16 16:06   ` Joel Brobecker
2010-03-22 22:56     ` Doug Evans [this message]

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=e394668d1003221556h14d143adu7f4e80785172cf53@mail.gmail.com \
    --to=dje@google.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=vapier@gentoo.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