This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/24506] short int parameter wrong in optimized code
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 24 Oct 2005 17:19:40 -0000
- Subject: [Bug c/24506] short int parameter wrong in optimized code
- References: <bug-24506-11580@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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