|
From: Tony G. <Ton...@Su...> - 2005-03-09 15:50:31
|
Tim Waugh <tw...@re...> writes: > I just tried compiling xmlroff 0.3.2 and I got this error: > > fo-object.c: In function 'fo_object_sprintf': > fo-object.c:251: error: 'struct _FoObjectClass' has no member named > '__builtin___sprintf_chk' > fo-object.c:251: error: syntax error before ')' token > > It's because sprintf is a macro (I have -D_FORTIFY_SOURCE=2 in my > CFLAGS). > > Names of C functions that may be implemented as macros cannot be used > as user functions or variables, and that includes this struct member. > > I think it needs to be changed to something other than 'sprintf'. But 'sprintf' is such an evocative but descriptive name that just rolls off the tongue so easily! While 'sprintf' is actually not evocative, or descriptive, or easily rolling off the tongue, it is well known. Would gcc complain if it was '->sprintf_func'? Are there any other suggestions for a name? Regards, Tony. |