lkml.org 
[lkml]   [1999]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] *(int*)0 = 0 & variations
Stefan Monnier wrote:
> PS: if they do have side-effects, then they are bogus.

We could spot bogus side effects like this, though it's not nice if
__expr is really a slow-evaluating thing:

#ifndef NDEBUG
#define kassert(__expr) \
do { int __i; for (__i = 0; __i < 1000000; __i++) (void) (__expr);
if (!(__expr))
__kassert_failure (__FILE__, __LINE__, __FUNCTION__, #__expr);
} while (0)
#else
#define kassert(__expr) do { } while (0)

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.025 / U:0.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site