From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pz0-f51.google.com (mail-pz0-f51.google.com [209.85.210.51]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id A355CB6EDD for ; Fri, 8 Apr 2011 03:04:19 +1000 (EST) Received: by pzk26 with SMTP id 26so1037800pzk.38 for ; Thu, 07 Apr 2011 10:04:16 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1302162933.2458.33.camel@pasglop> References: <4D966C5C.9030409__15236.8285613649$1301704900$gmane$org@cyconix.com> <4D9C6413.8030103@cyconix.com> <1302162933.2458.33.camel@pasglop> Date: Thu, 7 Apr 2011 12:04:16 -0500 Message-ID: Subject: Re: halt/reset on assert? From: kevin diggs To: Benjamin Herrenschmidt Content-Type: text/plain; charset=ISO-8859-1 Cc: Andreas Schwab , linuxppc-dev@lists.ozlabs.org, Evan Lavelle List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Thu, Apr 7, 2011 at 2:55 AM, Benjamin Herrenschmidt 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.