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

Re: math-emu on buildd machine?



Steve Langasek <vorlon@debian.org> writes:

> On Mon, Jan 14, 2008 at 07:41:11AM +0100, Paolo Bonzini wrote:
>> int g(float z)
>> {
>>   printf ("%g\n", z);
>> }
>
> Well, AFAICS this is an error; %g refers to a double, and
> you're passing a float, so that output would be undefined.

The default argument promotions (C99 6.5.2.2p6-7) will convert
this float to double before the call.

However, I didn't see any #include <stdio.h> or int printf(const
char *format, ...) declaration in the source code posted to this
thread.  Calling a variadic function without a prototype results
in undefined behaviour in principle, but I don't remember whether
it matters in practice with the calling conventions of the Alpha.

Attachment: pgpHhoadST7KO.pgp
Description: PGP signature


Reply to: