This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/15574] inappropriate optimization of printf()
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 May 2004 19:34:44 -0000
- Subject: [Bug c/15574] inappropriate optimization of printf()
- References: <20040521192212.15574.belyshev@lubercy.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-05-21 19:34 -------
Indeed. The functions in the C library are reserved. If you replace them
with your own implementations, you invoke undefined behavior. (Note that
a simple implementation of printf might actually check internally whether
there are any % signs in the text, and if not pass the string on to puts
-- that's certainly a case you will have to allow.)
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15574