Use of va_arg function

Alexandre Oliva aoliva@redhat.com
Thu Jul 12 13:56:00 GMT 2001


On Jul 11, 2001, Carla Nunes <carlanunes@yahoo.com> wrote:

> I got an error message saying that the type I passed as parameter
> (sqlint16) is promoted to another type (int) when passed through
> '...'

GCC is right.  It worked with another compiler out of pure luck.
Since signed integer types shorter than int are promoted to int when
passed through `...', you can't expect to get a short back from the
va_list.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me



More information about the Gcc-help mailing list