This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: bad macro definition: gettext
Troy A. Griffitts writes:
> > 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.
Well, it's true; you might not like it, but it is so.
> 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.
Right, but that happend because you're including C header files that
have this property. A clean way to fix this is to write a C++ wrapper
that hides the "unclean" C stuff in the header files.
So, what file are you including that pulls in gettext headers?
Perhaps it shouldn't.
Andrew.