From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eli Zaretskii To: Andrew Cagney Cc: GDB Patches Subject: Re: [fyi] fix mips-tdep.c -Wprintf(a?"%d":"%d%d", ...) Date: Wed, 21 Feb 2001 02:27:00 -0000 Message-id: References: <3A93020B.B82D6540@cygnus.com> X-SW-Source: 2001-02/msg00420.html On Tue, 20 Feb 2001, Andrew Cagney wrote: > I've checked in the attatched. A GCC variant didn't like conditional > formats vis: > > printf (cond ? "arg1=%d" : "arg1=%d arg2+%d", arg1, arg2); That's one of my gripes with latest versions of GCC (which version did you use, btw?): this change caused lots of valid C code to start emitting tons of warnings. Ulrich Drepper tried to change GCC maintainers' minds on this one (evidently, glibc uses such expressions in printf's), to no avail IIRC. Isn't there a compiler switch to turn this warning off? Perhaps we should use it instead of ``fixing'' that which isn't broken.