All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Weil <sw@weilnetz.de>
To: Sergey Fedorov <serge.fdrv@gmail.com>,
	QEMU Developer <qemu-devel@nongnu.org>,
	QEMU Trivial <qemu-trivial@nongnu.org>
Cc: Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-trivial] [PATCH] tci: Fix build regression
Date: Mon, 4 Apr 2016 22:40:38 +0200	[thread overview]
Message-ID: <5702D146.6020404@weilnetz.de> (raw)
In-Reply-To: <5702AD10.8040807@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 757 bytes --]

Am 04.04.2016 um 20:06 schrieb Sergey Fedorov:
> On 04/04/16 20:50, Stefan Weil wrote:
>> -/* Defining NDEBUG disables assertions (which makes the code faster). */
>> -#if !defined(CONFIG_DEBUG_TCG) && !defined(NDEBUG)
>> -# define NDEBUG
>> +/* Enable TCI assertions only when debugging TCG (and without NDEBUG defined).
>> + * Without assertions, the interpreter runs much faster. */
>> +#if defined(CONFIG_DEBUG_TCG)
>> +# define tci_assert(cond) assert(cond)
>> +#else
>> +# define tci_assert(cond) (void)0
> 
> Maybe wrap the "(void)0" into parentheses?
> 
> Kind regards,
> Sergey
> 
>>  #endif
> 

Maybe. It's not needed for the current code.
Are there situations where parentheses for this would make a difference?

Stefan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Stefan Weil <sw@weilnetz.de>
To: Sergey Fedorov <serge.fdrv@gmail.com>,
	QEMU Developer <qemu-devel@nongnu.org>,
	QEMU Trivial <qemu-trivial@nongnu.org>
Cc: Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [PATCH] tci: Fix build regression
Date: Mon, 4 Apr 2016 22:40:38 +0200	[thread overview]
Message-ID: <5702D146.6020404@weilnetz.de> (raw)
In-Reply-To: <5702AD10.8040807@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 757 bytes --]

Am 04.04.2016 um 20:06 schrieb Sergey Fedorov:
> On 04/04/16 20:50, Stefan Weil wrote:
>> -/* Defining NDEBUG disables assertions (which makes the code faster). */
>> -#if !defined(CONFIG_DEBUG_TCG) && !defined(NDEBUG)
>> -# define NDEBUG
>> +/* Enable TCI assertions only when debugging TCG (and without NDEBUG defined).
>> + * Without assertions, the interpreter runs much faster. */
>> +#if defined(CONFIG_DEBUG_TCG)
>> +# define tci_assert(cond) assert(cond)
>> +#else
>> +# define tci_assert(cond) (void)0
> 
> Maybe wrap the "(void)0" into parentheses?
> 
> Kind regards,
> Sergey
> 
>>  #endif
> 

Maybe. It's not needed for the current code.
Are there situations where parentheses for this would make a difference?

Stefan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-04-04 20:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-04 17:50 [Qemu-trivial] [PATCH] tci: Fix build regression Stefan Weil
2016-04-04 17:50 ` [Qemu-devel] " Stefan Weil
2016-04-04 18:06 ` [Qemu-trivial] " Sergey Fedorov
2016-04-04 18:06   ` [Qemu-devel] " Sergey Fedorov
2016-04-04 20:40   ` Stefan Weil [this message]
2016-04-04 20:40     ` Stefan Weil
2016-04-04 21:03     ` [Qemu-trivial] " Peter Maydell
2016-04-04 21:03       ` [Qemu-devel] " Peter Maydell

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=5702D146.6020404@weilnetz.de \
    --to=sw@weilnetz.de \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=serge.fdrv@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.