bad macro definition: gettext
Troy A. Griffitts
scribe@crosswire.org
Mon Jun 24 11:08:00 GMT 2002
> 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.
More information about the Gcc
mailing list