For what it's worth I'm more with Bruno on this. For the tests, the cost of these warnings outweighs the benefit. It'd be OK with me to disable the troublesome warnings globally for the tests subdirectory, using -Wno-missing-prototypes or whatever. For the -Wnull-dereference issue it may be worthwhile to use a circumlocution that fools GCC into not issuing the warning. After all, a compiler smart enough to warn about '*(volatile int *) 0 = 42' might also be smart enough to see that it's undefined behavior and therefore omit the assignment's effect entirely. Perhaps something like the attached (untested) patch?