This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Failed to build mips64-elf with NLS on OSX


Masaki Muranaka <monaka@monami-software.com> writes:

> On 2006/06/15, at 17:22, Andreas Schwab wrote:
>> GCC should recognize gettext specially in the context of format string
>> tests.
>
> Regardless GCC should work so, the build was failed.

GCC _does_ work so.

> This is a sample script that reproduce the error.
> I tested on gcc-4.0.1/OSX and gcc-3.2.2/Linux.
> Results are same.
>
> -8<----8<----8<----8<----8<----8<---
> cat <<__EOF > test.c
> #include <stdio.h>
>
> # define _(String) gettext (String)
>
> int
> main(int argc, char **argv)
> {
>         printf(_("aaa"));
> }
> __EOF
> gcc -Werror -Wformat -Wformat-nonliteral -c test.c
> -8<----8<----8<----8<----8<----8<---

This is not a valid testcase since gettext is not declared.

I cannot reproduce the problem with any gcc version, once the missing
declaration is added.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]