Re: [9fans] varargs question

2009-08-20 Thread erik quanstrom
> what problem are you trying to solve? > > the limit would check only that the right number of > argument bytes are consumed, but not that they are > interpreted correctly. print("%s %d", 1, "hello") would > still crash, as would print("%s", 1, "hello"). > > #pragma varargck is more precise and

Re: [9fans] varargs question

2009-08-20 Thread Russ Cox
On Thu, Aug 20, 2009 at 6:56 AM, erik quanstrom wrote: > 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 acces

[9fans] varargs question

2009-08-20 Thread erik quanstrom
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 upd