[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
wint_t in printf-args.c under mingw32
From: |
Ben Pfaff |
Subject: |
wint_t in printf-args.c under mingw32 |
Date: |
Sun, 11 Feb 2007 13:03:03 -0800 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) |
While compiling GNU PSPP under mingw32, for portability testing
purposes, I noticed an error from printf-args.c in gnulib:
../../intl/printf-args.c: In function `printf_fetchargs':
../../intl/printf-args.c:83: warning: `wint_t' is promoted to `int' when passed
through `...'
../../intl/printf-args.c:83: warning: (so you should pass `int' not `wint_t' to
`va_arg')
../../intl/printf-args.c:83: note: if this code is reached, the program will
abort
which corresponds to these source lines:
#ifdef HAVE_WINT_T
case TYPE_WIDE_CHAR:
ap->a.a_wide_char = va_arg (args, wint_t);
break;
#endif
I see that in other cases in that file where the type passed to
va_arg is likely to be narrower than int, "int" is what is passed
to va_arg as the type. Should the same tactic be used here?
--
Ben Pfaff
address@hidden
http://benpfaff.org
- wint_t in printf-args.c under mingw32,
Ben Pfaff <=