Re: Strange ipfw change (Sparc bugfix?)

pacman (pacman-kernel@cqc.com)
Thu, 10 Sep 1998 02:29:59 -0500 (EST)


Alan Modra writes the following:
>gcc indeed knows that a short, char, float etc are promoted. Check
>stdarg.h or varargs.h. You'll see that the size of the requested type is
>rounded up as necessary. No problem.

:r!head -5 /usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/include/stdarg.h

/* stdarg.h for GNU.
Note that the type used in va_arg is supposed to match the
actual type **after default promotions**.
Thus, va_arg (..., short) is not valid. */

Hmm... The header seems to be confirming what I said :)

Looking further down, I see some ugly macros that may be designed to cover up
the error of calling va_arg(foo, short), but these seem like a bad idea to me
since it is an error that's just as easily fixed as covered up...

-- 
Alan Curry

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/faq.html