Subject: Fixing va_arg in third party code
To: None <firstname.lastname@example.org>
From: Joerg Sonnenberger <email@example.com>
Date: 10/04/2005 21:41:00
I've stumbled over some cases of incorrect va_arg use with small types.
The problem is that e.g. "short" or "mode_t" (== uint16_t) arguments are
promoted to int on all 32bit platforms (at least all I know about), but
va_arg doesn't have to follow the same rules. In fact GCC 3.4's builtin
va_arg support doesn't do it, but bitches about it instead.
This results in two questions for me:
(a) Do we want to fix it by chancing the va_arg usage unconditionally to int?
I would do it for DragonFly otherwise, since I know it is correct on
(b) Do we have any platform targeted by pkgsrc, which doesn't promote
arguments shorter than int to that?