Код
lib.c: In function ‘printf’:
lib.c:240:6: warning: ‘float’ is promoted to ‘double’ when passed through ‘...’
fmt_float(va_arg(ap, float), n);
^
lib.c:240:6: note: (so you should pass ‘double’ not ‘float’ to ‘va_arg’)
lib.c:240:6: note: if this code is reached, the program will abort
CC sh.c
CC cml.c
CC pmc.c
LD fw
/tmp/fw/cml.o: In function `irq_load_time':
cml.c:(.text+0xb8): undefined reference to `__aeabi_f2d'
lib.c:240:6: warning: ‘float’ is promoted to ‘double’ when passed through ‘...’
fmt_float(va_arg(ap, float), n);
^
lib.c:240:6: note: (so you should pass ‘double’ not ‘float’ to ‘va_arg’)
lib.c:240:6: note: if this code is reached, the program will abort
CC sh.c
CC cml.c
CC pmc.c
LD fw
/tmp/fw/cml.o: In function `irq_load_time':
cml.c:(.text+0xb8): undefined reference to `__aeabi_f2d'
Как можно избежать преобразования float к double?
Можно сделать вид, что float это int (если размеры совпадают, а у меня на cm4f это так), но нет ли более красивого решения.
Спасибо.