Patch for format non-literal warnings

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Fri Dec 31 16:38:00 GMT 1999


 > From: Richard Henderson <rth@cygnus.com>
 >  
 > On Mon, Dec 27, 1999 at 11:39:34AM -0500, Kaveh R. Ghazi wrote:
 > > However the code is located in asm_fprintf which is specifically
 > > parsing its format specifier.  These print statements are in a switch
 > > which handles each particular format case.  In each one, the `buf'
 > > parameter has been parsed to contain the appropriate format specifier
 > > to consume an arg.
 >  
 > No, you're wrong.  By passing argptr to vfprintf, you invoke undefined
 > behaviour -- it may or may not consume arguments as seen by asm_fprintf.
 > This is something that's going to vary between eg x86 and sysv ppc.
 > r~

Okay I think I understand.  I guess its sort of like, conceptually at
least, that the va_list can be either passed "by value" or "by
reference" (in terms of consumption being noticed by the caller) and
we have no guarantee which one it is, i.e. undefined behavior you make
reference to.

Okay consider the patch to final.c withdrawn.  Thanks for the explanation.

		--Kaveh
--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions



More information about the Gcc-patches mailing list