This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: bad macro definition: gettext
- From: Neil Booth <neil at daikokuya dot co dot uk>
- To: "Troy A. Griffitts" <scribe at crosswire dot org>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 24 Jun 2002 18:44:42 +0100
- Subject: Re: bad macro definition: gettext
- References: <3D175AEC.5060202@crosswire.org>
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.