bad macro definition: gettext

Neil Booth neil@daikokuya.co.uk
Mon Jun 24 11:08:00 GMT 2002


Troy A. Griffitts wrote:-

> hey guys,
> 	It seems that recently you have defined 'gettext' as a macro.  This 
> really screws up my C++ framework that has a member function called 
> gettext in one of it's classes.
> myClass->gettext(...) should NOT use your macro, but still does (by 
> correct C++ symantecs).  I would suggest replacing the macro definition 
> with an inline function, if C++.

Whether something is or is not a macro is nothing to do with
GCC; it's the package concerned.

You can do either a #undef or put parentheses around gettext to
avoid the macro expansion.  If you're including gettext headers,
it's really your responsibility to avoid names that are in those
headers or avoid assumptions about their form (in the case of
function names).

Neil.



More information about the Gcc mailing list