On 12/10/2013 10:55 AM, Eduardo Habkost wrote: > The compiler is capable of eliminating the KVM-specific function calls > as long as the calling function has an assert(kvm_enabled()) line, so we > don't need to wrap all KVM-specific code inside #ifdefs.
Really? In tcg/tcg.h we force NDEBUG if not CONFIG_TCG_DEBUG, which makes assert expand to nothing. This statement may be true for some files, but almost everything under target-i386 includes tcg.h. Although I know we've talked within glibc and gcc the de-optimization of missing out on assert info, and how we ought to use __builtin_gcc_unreachable in order to retain that, we've still not done anything official with <assert.h>. That said, I don't disagree with the changes, if they work with a forced -DNDEBUG, i.e. unreachable code that still compiles. r~