[Bug c/35649] New: Incorrect printf warning: expect double has float

2008-03-20 Thread 6yxwfq202 at sneakemail dot com
With the -Wformat option The code

void foo( float a )
{
printf(%f,a);
}

give the warning:
foo.c:3: warning: format '%f' expects type 'double', but argument 2 has type
'float'

I believe this is unnecessary because float is promoted to double in variadic
functions.


-- 
   Summary: Incorrect printf warning: expect double has float
   Product: gcc
   Version: 4.1.0
Status: UNCONFIRMED
  Severity: trivial
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: 6yxwfq202 at sneakemail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35649



[Bug c/35649] Incorrect printf warning: expect double has float

2008-03-20 Thread 6yxwfq202 at sneakemail dot com


--- Comment #2 from 6yxwfq202 at sneakemail dot com  2008-03-20 16:04 
---
Target is h8300-elf running on pc-windows or pc-cygwin

printf prototype:
extern int printf( const char * fmt, ...);


-- 

6yxwfq202 at sneakemail dot com changed:

   What|Removed |Added

 GCC target triplet||h8300-elf


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35649