freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: Bug#54539: freetype2 abuses va_arg]


From: Pavel Kankovsky
Subject: Re: address@hidden: Bug#54539: freetype2 abuses va_arg]
Date: Thu, 13 Jan 2000 18:01:12 +0100 (MET)

On Thu, 13 Jan 2000, Werner LEMBERG wrote:

> > -  numCR = va_arg(vp, UShort);
> > +  numCR = (UShort)va_arg(vp, int);
> 
> Are you sure this is a bug of ttf2pfb and not a bug of Linux resp. gcc
> on a PowerPC?

I have consulted the Books. Arguments substituted for an ellipsis are
subject of integer promotion, i.e. chars and shorts are converted to ints
(or unsigned ints if the original (unsigned) type would not fit into int
completely) before they are passed to the called function. Therefore the
old code is incorrect (it appeared to work because at least gcc
implementation of va_arg() masks the bug).

--Pavel Kankovsky aka Peak  [ Boycott Microsoft--http://www.vcnet.com/bms ]
"Resistance is futile. Open your source code and prepare for assimilation."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]