public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: "Kaveh R. Ghazi" <ghazi@caip.rutgers.edu>
Cc: pcarlini@unitus.it, dj@redhat.com, gcc@gcc.gnu.org,
	libstdc++@gcc.gnu.org
Subject: Re: Libiberty's snprintf for v3?
Date: Tue, 22 Apr 2003 10:53:00 -0000	[thread overview]
Message-ID: <jewuhm52lq.fsf@sykes.suse.de> (raw)
In-Reply-To: <200304220041.UAA22116@caip.rutgers.edu> (Kaveh R. Ghazi's message of "Mon, 21 Apr 2003 20:41:27 -0400 (EDT)")

"Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> writes:

|> C.  I'm not sure if it's legal (portable) to traverse the va_list
|>     twice inside vsnprintf.c, once with vfprintf and once is vsprintf.

It is only legal when both traverses are either bracketed by
va_start/va_end, or you use va_copy to copy the va_alist object.  va_copy
is a C99 feature, if it isn't provided use __va_copy if defined, else a
simple assignment.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  parent reply	other threads:[~2003-04-22  9:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3EA44576.90708@unitus.it>
2003-04-22  2:19 ` Kaveh R. Ghazi
2003-04-22  2:24   ` DJ Delorie
2003-04-22  5:59     ` Kaveh R. Ghazi
     [not found]     ` <200304220247.WAA19945@caip.rutgers.edu>
     [not found]       ` <200304220313.h3M3D4c32419@greed.delorie.com>
2003-04-22 23:53         ` Kaveh R. Ghazi
2003-04-23 12:49           ` Andreas Schwab
2003-04-26 23:25             ` Kaveh R. Ghazi
2003-04-22 10:53   ` Andreas Schwab [this message]
2003-04-22 23:56     ` Kaveh R. Ghazi
2003-04-22 20:43   ` Joe Buck
2003-04-23  0:01     ` Kaveh R. Ghazi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jewuhm52lq.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --cc=dj@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=ghazi@caip.rutgers.edu \
    --cc=libstdc++@gcc.gnu.org \
    --cc=pcarlini@unitus.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).