This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: bad macro definition: gettext
- From: Mumit Khan <khan at nanotech dot wisc dot edu>
- To: Andrew Haley <aph at cambridge dot redhat dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Mon, 24 Jun 2002 15:37:56 -0500 (CDT)
- Subject: Re: bad macro definition: gettext
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