9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] varargs question
@ 2009-08-20 13:56 erik quanstrom
  2009-08-20 15:05 ` Russ Cox
  0 siblings, 1 reply; 3+ messages in thread
From: erik quanstrom @ 2009-08-20 13:56 UTC (permalink / raw)
  To: 9fans

as i was drifting off to sleep the other night,
i was wondering about varargs.  (clearly, it's
time for a vacation.)

and i wondered why kenc doesn't add an argument
count before the first vararg.  (bwc pointed out
that the address following the last vararg would be
more useful.)  va_* could be updated to deal with
the silent extra and abort on access beyond the end
of the actual variable arguments.  a function to check
that list == end could added for the paranoid.

since all code is prototyped these days,
is there any reason why this is a bad idea that i
haven't thought of?

- erik



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-08-20 15:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-20 13:56 [9fans] varargs question erik quanstrom
2009-08-20 15:05 ` Russ Cox
2009-08-20 15:32   ` erik quanstrom

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 NNTP newsgroup(s).