Subject: Re: Fixing va_arg in third party code
To: None <tech-pkg@netbsd.org>
From: Martin Husemann <martin@duskware.de>
List: tech-pkg
Date: 10/04/2005 22:54:15
On Tue, Oct 04, 2005 at 09:41:00PM +0200, Joerg Sonnenberger wrote:
> 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.

I have the gut feeling that any va_arg(ap, type) call where type is not
immune to promotion if passed to non-prototyped functions is inherently
non portable.

Martin