This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/24506] short int parameter wrong in optimized code



------- Comment #1 from pinskia at gcc dot gnu dot org  2005-10-24 17:19 -------
With -Wall, I get:
t.c: In function ?main?:
t.c:6: warning: format ?%d? expects type ?int *?, but argument 2 has type
?short int *?
t.c:8: warning: format ?%d? expects type ?int *?, but argument 2 has type
?short int *?


Which is correct, you want %hd and not %d.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]