------- Comment #3 from wilson at tuliptree dot org  2008-03-22 02:13 -------
Subject: Re:   New: Incorrect printf warning: expect double has
 float

6yxwfq202 at sneakemail dot com wrote:
> 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.

Small 8/16 bit microprocessors often don't support all FP types. 
h8300.h has for instance
#define FLOAT_TYPE_SIZE 32
#define DOUBLE_TYPE_SIZE        32
So floats and doubles are the same thing, which is probably confusing 
something in the C front end.  Maybe a type conversion got optimized 
away (folded?) because it was a no-op for instance.  I haven't tried to 
reproduce this.

Jim


-- 


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

Reply via email to