[Bug c/55746] vfprintf behaves differently variable on stack vs const argument.

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Dec 19 23:44:00 GMT 2012


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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-12-19 23:44:14 UTC ---
And this is not a bug really.  GCC is optimizing the first one to fwrite but
not the second one since it does not see the constant string in the first case.
 Also this code is undefined as the varargs that you passed to vfprintf is not
a real one.



More information about the Gcc-bugs mailing list