[Top][All Lists]

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

Re: [avr-chat] format '%5.2f' expects type 'double', but argument 6 has

From: Joerg Wunsch
Subject: Re: [avr-chat] format '%5.2f' expects type 'double', but argument 6 has type 'float'
Date: Fri, 3 Feb 2012 08:02:20 +0100 (MET)

Rick Mann <address@hidden> wrote:

> I thought the %f specifier accepted double or float.

While it's in practice the same in AVR-GCC, formally, it doesn't.
There is no output format specifier for `float', since it's impossible
passing a float down to a vargs function (it will always be promoted
to `double').

Reference: ISO/IEC 9899:1999, The fprintf function

cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)

reply via email to

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