On 16/06/2013 12:42, John Emmas wrote:
I think I arrived at the right conclusion but for the wrong reason. The damage in fact gets caused in 'glib/gmessages.h' by the declaration of 'g_return_if_fail' (again, abbreviated slightly for clarity):- #ifdef __GNUC__ #define g_return_if_fail(expr) G_STMT_START{ \ if G_LIKELY(expr) { } else \ { \ g_return_if_fail_warning (G_LOG_DOMAIN, \ __PRETTY_FUNCTION__, \ #expr); \ return; \ }; }G_STMT_END #else /* !__GNUC__ */ #define g_return_if_fail(expr) G_STMT_START{ \ if (expr) { } else \ { \ g_log (G_LOG_DOMAIN, \ G_LOG_LEVEL_CRITICAL, \ "file %s: line %d: assertion '%s' failed", \ __FILE__, \ __LINE__, \ #expr); \ return; \ }; }G_STMT_END #endif So as you can see, for any non-GNUC build, the name of the function that failed will not form part of the assertion text. So my suggested fix (in 'test_glib.c') should probably get changed to this:- #ifdef __GNUC__ g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, "*g_print*assertion*failed*"); #else g_test_expect_message (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, "*assertion*failed*"); #endif Do I need to submit a bug report and patch or can it be fixed quite easily (given that the code only just got changed) ? John |