On 05/13/2014 02:38 AM, Alex Bennée wrote:
>> +    info = g_hash_table_lookup(s->helpers, (gpointer)func);
>> > +    assert(info != NULL);
>> > +    assert(info->sizemask == sizemask);
> I assume g_assert vs assert is purely cosmetic? QEMU seems inconsistent
> at best about this :-/

Yes indeed.  It doesn't help that g_assert is stupid and doesn't evaluate its
argument when assertions are disabled, so that you can get unused variable
warnings.

The best sort of assert is as we do for tcg_debug_assert, where we invoke
__builtin_unreachable when not aborting, which gives the compiler optimization
info about the expression.

I'm not sure how best to clean all this up in qemu, but I'm pretty sure that
more use of glib isn't it.


r~

Reply via email to