linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: kevin diggs <diggskevin38@gmail.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Andreas Schwab <schwab@linux-m68k.org>,
	linuxppc-dev@lists.ozlabs.org,
	Evan Lavelle <sa212+lppc@cyconix.com>
Subject: Re: halt/reset on assert?
Date: Thu, 7 Apr 2011 12:04:16 -0500	[thread overview]
Message-ID: <BANLkTimX==Ei2Sn=86svSajHNX+0G1WM9w@mail.gmail.com> (raw)
In-Reply-To: <1302162933.2458.33.camel@pasglop>

On Thu, Apr 7, 2011 at 2:55 AM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> On Wed, 2011-04-06 at 14:01 +0100, Evan Lavelle wrote:
>> #define MY_ASSERT(expr) if(!(expr)) BUG()
>
> Make it
>
> #define MY_ASSERT(expr) do { if .... } while(0)
>
> To ensure it has proper single statement semantics in C.
>
So THAT'S why they do this!!!!!! Now I just have to figure out what
'proper single statement semantics' means!

THANKS!!!

kevin

> Cheers,
> Ben.

  reply	other threads:[~2011-04-07 17:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4D966C5C.9030409__15236.8285613649$1301704900$gmane$org@cyconix.com>
2011-04-02  6:51 ` halt/reset on assert? Andreas Schwab
2011-04-02  6:53 ` Andreas Schwab
2011-04-06 13:01   ` Evan Lavelle
2011-04-07  7:55     ` Benjamin Herrenschmidt
2011-04-07 17:04       ` kevin diggs [this message]
2011-04-07 21:48         ` Benjamin Herrenschmidt
2011-04-02  0:22 Evan Lavelle

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='BANLkTimX==Ei2Sn=86svSajHNX+0G1WM9w@mail.gmail.com' \
    --to=diggskevin38@gmail.com \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=sa212+lppc@cyconix.com \
    --cc=schwab@linux-m68k.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;
as well as URLs for NNTP newsgroup(s).