Re: [PATCH] *(int*)0 = 0 & variations

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Tue, 29 Jun 1999 04:11:46 +0200


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/