This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: bad macro definition: gettext
- From: "Troy A. Griffitts" <scribe at crosswire dot org>
- To: Neil Booth <neil at daikokuya dot co dot uk>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 24 Jun 2002 11:02:24 -0700
- Subject: Re: bad macro definition: gettext
- Organization: CrossWire Bible Society
- References: <3D175AEC.5060202@crosswire.org> <20020624174442.GB5101@daikokuya.co.uk>
Whether something is or is not a macro is nothing to do with
GCC; it's the package concerned.
Ok, is there a glibc list or something to which I should post this?
You can do either a #undef or put parentheses around gettext to
avoid the macro expansion.
Thanks, I never knew about this.
so, myClass->(gettext)(...)
???
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).
Actually, that's kindof lame to tell a C++ programmer. First of all,
macros, should almost never be used in C++, and second of all you are
saying that ::globalFunction is NEVER safe, as someone might choose to
define that global function as a macro, and your scoped impl will be hosed.
Thanks for the feedback.
-Troy.