[PATCH] Tweak assert -DNDEBUG for the new -Wunused-but-set-{variable,parameter} warnings

Roland McGrath roland@redhat.com
Thu Apr 8 17:54:00 GMT 2010


Unfortunately I think this is wrongly incompatible, as Andreas said.
e.g., consider:

#ifndef NDEBUG
static int checker () { ... }
#endif

...
	assert (checker () == 0);
...

Or even worse, it could be hairy macros so that under NDEBUG
the expression is actually unparseable.


Thanks,
Roland



More information about the Libc-hacker mailing list