GCC warning, whom to blame?

Ralf Ertzinger fedora-devel at camperquake.de
Thu Mar 10 13:33:52 UTC 2005


Hi.

I am getting a GCC error while compiling a package (which is not part of FC),
and I'd like to know if this is a gcc4 bug (which I think it is):

The compile dies with:

configfile.c:87:73: error: macro "read" passed 4 arguments, but takes just 3
configfile.c: In function 'xmms_cfg_read_value':
configfile.c:86: warning: return makes integer from pointer without a cast
configfile.c:95:66: error: macro "read" passed 4 arguments, but takes just 3
configfile.c: In function 'xmms_cfg_write_value':
configfile.c:94: warning: statement with no effect


The line in question reads:

82 gboolean xmms_cfg_read_value(ConfigFile * config_file,
83                              const gchar * section, const gchar * key,
84                              XmmsCfgValueType value_type, gpointer * value)
85 {
86     return xmms_cfg_value_type_func[value_type].read(config_file,
87                                                      section, key, value);
88 }

I think glibc implemets the read system call as a macro, and GCC tries to
apply this macro to the .read part above. Am I correct? If yes, is GCC
correct in doing this?

-- 
24 hours in a day, 24 beers in a case. Coincidence?  I think not.




More information about the devel mailing list