------- Comment #4 from hp at gcc dot gnu dot org 2009-05-26 03:27 ------- When porting code such as in the description, it can be argued that robustifying the code is an important part; that undefined code that just happened to "work" for the initial target(s) is corrected to use defined constructs that work everywhere. If that's not an option here, perhaps you can add application-specific printf and puts, versions that handles NULL arguments such as the application expects.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40097