This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch for format non-literal warnings
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Subject: Re: Patch for format non-literal warnings
- From: Richard Henderson <rth at cygnus dot com>
- Date: Mon, 27 Dec 1999 10:32:51 -0800
- Cc: egcs-patches at egcs dot cygnus dot com
- References: <199912271639.LAA01876@caip.rutgers.edu>
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~