Some old Solaris libcs don't like being passed a NULL pointer as the string 
parameter corresponding to the %s marker of formatting functions.

Fixed thusly, tested on SPARC/Solaris, applied on the mainline as obvious.


2017-11-07  Eric Botcazou  <ebotca...@adacore.com>

        * gimple-pretty-print.c (dump_profile): Return "" instead of NULL.

-- 
Eric Botcazou
Index: gimple-pretty-print.c
===================================================================
--- gimple-pretty-print.c	(revision 254449)
+++ gimple-pretty-print.c	(working copy)
@@ -86,7 +86,7 @@ dump_profile (profile_count &count)
 {
   char *buf;
   if (!count.initialized_p ())
-    return NULL;
+    return "";
   if (count.ipa_p ())
     buf = xasprintf ("[count: %" PRId64 "]",
 		     count.to_gcov_type ());

Reply via email to