From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Wed, 30 Sep 2009 08:57:06 -0400 To: lucio@proxima.alt.za, 9fans@9fans.net Message-ID: <5bf8b5390a97a1ebaad1d77a2dcbb9a7@brasstown.quanstro.net> In-Reply-To: <<4c83c9076f3de55d5a49deff52f0f37c@proxima.alt.za>> References: <<4c83c9076f3de55d5a49deff52f0f37c@proxima.alt.za>> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] corrections to /sys/src/cmd/8l/l.h Topicbox-Message-UUID: 79a80c94-ead5-11e9-9d60-3106f5b1d025 On Wed Sep 30 00:30:19 EDT 2009, lucio@proxima.alt.za wrote: > At the tail end of the module there is a shorter set of "#pragma > varargck"s that repeats the entries earlier in the file, disagreeing > with one of them. The disagreeing entry matches the #pragma in > /sys/src/cmd/vl/l.h so I'm not sure which ought to be used (or what > effect the conflict has). > it's okay to have varargchk type's specify different types for the same format letter, as long as each is valid. for example, since uintptr and void* are both valid arguments for #p, libc properly declares both okay. in your case uint and int are both declared okay. and it looks good to me as the argument is used an index into a name array. in fact, due to c type promotion rules, one could also declare char, uchar, short, ushort to be acceptable. though evidently that's not needed. duplicate entries should probablly deleted. while you're at it, add #pragma varargck argpos diag 1 you will then be magicly informed of a few vararg botches. - erik