This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bad macro definition: gettext


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]