glib g_return_val_if_fail problems with gcc4 (__PRETTY_FUNCTION__??)

Thomas M Steenholdt tmus at tmus.dk
Wed Oct 5 10:44:16 UTC 2005


Hi...

I have a small piece of code that utilizes the g_return_val_if_fail 
macro from glib... that macro wraps the g_return_if_fail_warning 
function, but building with gcc4 -Wall -Werror -ansi makes it spew the 
following error at every call to g_return_val_if_fail

warning: passing argument 2 of 'g_return_if_fail_warning' discards 
qualifiers from pointer target type

i'm not calling g_return_if_fail_warning directly from anywhere within 
my code.

this is all very strange to me...

if i do the exact same build with gcc32,  I have no problems...

Could anyone advise if this is a bug or if perhaps i need some gcc4 
specific options to make this work properly?

thanks in advance

/Thomas




More information about the fedora-devel-list mailing list