From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: erik quanstrom Date: Thu, 20 Aug 2009 09:56:31 -0400 To: 9fans@9fans.net MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] varargs question Topicbox-Message-UUID: 4f1fb792-ead5-11e9-9d60-3106f5b1d025 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