On Wed Sep 30 00:30:19 EDT 2009, lu...@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

Reply via email to