This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: [fyi] fix mips-tdep.c -Wprintf(a?"%d":"%d%d", ...)



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.


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