http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46372
Summary: format '%f' expects type 'double', but argument 3 has
type 'float'
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: [email protected]
ReportedBy: [email protected]
I am facing the warning from the subject when compiling this snippet below with
avr-*gcc's:
-- snip --
#include <stdio.h>
int main()
{
float f = 2.0;
fprintf( stdout, "%f\n", f );
}
-- snip --
# avr-rtems4.10-gcc -O2 -o foo -c foo.c -Wall
foo.c: In function 'main':
foo.c:6: warning: format '%f' expects type 'double', but argument 3 has type
'float'
# avr-rtems4.10-gcc --version
avr-rtems4.10-gcc (GCC) 4.4.5 20101001 (RTEMS
gcc-4.4.5-2.fc13/newlib-1.18.0-17.fc13)
# avr-gcc -O2 -o foo -c foo.c -Wall
foo.c: In function 'main':
foo.c:6:3: warning: format '%f' expects type 'double', but argument 3 has type
'float'
# avr-gcc --version
avr-gcc (Fedora 4.5.1-2.fc13) 4.5.1