This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/15574] inappropriate optimization of printf()


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]