bad macro definition: gettext
Mumit Khan
khan@nanotech.wisc.edu
Mon Jun 24 14:50:00 GMT 2002
On Mon, 24 Jun 2002, Andrew Haley wrote:
> So, what file are you including that pulls in gettext headers?
> Perhaps it shouldn't.
Anything that uses C++ locales (in libstdc++-v3) for example.
As others have already noted, it's a glibc2 issue, not a gcc issue,
and should be reported there instead. To get this into the search
engine for future reference, here's a simple testcase that shows
the problem using gcc-3.1 with recent versions of glibc, say the
ones distributed with RedHat 7.x.
#include <iostream>
struct
foo
{
void gettext();
};
Now, compile this with and without optimization -- optimization enables
the gettext macro in /usr/include/libintl.h, which causes interesting
parse errors. Works just fine without optimization since the macro is
not used.
Regards,
Mumit
More information about the Gcc
mailing list