This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/15685] printf("%s\n") optimized to puts also when parameter might be null
- 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: 27 May 2004 17:10:14 -0000
- Subject: [Bug c/15685] printf("%s\n") optimized to puts also when parameter might be null
- References: <20040527170505.15685.mikko.tiihonen@hut.fi>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-05-27 17:10 -------
Not a bug as printf can segfault if it is supplied a NULL pointer for the string formatter.
If glibc does something different than that, glibc is does not have a bug either as it is undefined really
so converting the call to a puts is a vaild transformation.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15685