Re: Debug build compile error in 'gobject/gobject.c'


On 3 August 2016 at 19:35, John Emmas <johne53 tiscali co uk> wrote:
On 03/08/2016 18:46, Emmanuele Bassi wrote:

This is likely a MSVC 8 issue. The GOBJECT_IF_DEBUG macro expands the
second argument to a code block, and it seems MSVC 8 has issues when
that includes a conditional pre-processor directive.

GOBJECT_IF_DEBUG hasn't changed since 2014, and the same commit
introduced the use you see failing.

That's what confused me.  The last commit date for gobject.c seems to be
25th May 2014 and yet the same code section looked like this only a
fortnight ago:-

        debug_objects_ht = g_hash_table_new (g_direct_hash, NULL);
        g_atexit (debug_objects_atexit);
#endif    /* G_ENABLE_DEBUG */

The above code compiles okay (or at least, it did a fortnight ago) and VC8
is supposedly a supported compiler, so will a fix be possible?

Care to file a bug with a link to this thread?

I'll try to come up with a patch for all the cases of this macro
exploiting undefined behaviour.


[@] ebassi []

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]