[Bug c/94258] Warning Correction while using format specifiers %hx and %ho
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Mar 22 22:58:10 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94258
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
t444.c: In function ‘main’:
t444.c:4:12: warning: format ‘%ho’ expects argument of type ‘int’, but argument
2 has type ‘double’ [-Wformat=]
4 | printf("%ho\n", 0.0);
| ~~^ ~~~
| | |
| int double
| %f
t444.c:5:12: warning: format ‘%hx’ expects argument of type ‘int’, but argument
2 has type ‘double’ [-Wformat=]
5 | printf("%hx\n", 0.0);
| ~~^ ~~~
| | |
| int double
| %f
That is correct warning as I mentioned. There is no short when passed via
variable arugments.
More information about the Gcc-bugs
mailing list