http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60736
--- Comment #7 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
diff --git a/libcpp/errors.c b/libcpp/errors.c
index d1ca7a12ff42..fa292214d677 100644
--- a/libcpp/errors.c
+++ b/libcpp/errors.c
@@ -230,7 +230,7 @@ cpp_warning_with_line_syshdr (cpp_reader *pfile, int
reason,
bool
cpp_errno (cpp_reader *pfile, int level, const char *msgid)
{
- if (msgid[0] == '\0')
+ if (msgid && msgid[0] == '\0')
msgid = _("stdout");
return cpp_error (pfile, level, "%s: %s", msgid, xstrerror (errno));