From 97f1f314feae938cf854af1ab844196383d0ddc2 Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Sun, 8 Sep 2013 14:30:27 +0000 Subject: re PR c++/54941 (do not print line/column numbers for :0:0) 2013-09-08 Paolo Carlini PR c++/54941 * diagnostic.c (diagnostic_build_prefix): When s.file is "" don't output line and column numbers. /testsuite 2013-09-08 Paolo Carlini PR c++/54941 * g++.dg/overload/new1.C: Adjust. From-SVN: r202366 --- gcc/diagnostic.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gcc/diagnostic.c') diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c index 87c002a..295bbb6 100644 --- a/gcc/diagnostic.c +++ b/gcc/diagnostic.c @@ -245,6 +245,9 @@ diagnostic_build_prefix (diagnostic_context *context, (s.file == NULL ? build_message_string ("%s%s:%s %s%s%s", locus_cs, progname, locus_ce, text_cs, text, text_ce) + : !strcmp (s.file, N_("")) + ? build_message_string ("%s%s:%s %s%s%s", locus_cs, s.file, locus_ce, + text_cs, text, text_ce) : context->show_column ? build_message_string ("%s%s:%d:%d:%s %s%s%s", locus_cs, s.file, s.line, s.column, locus_ce, text_cs, text, text_ce) -- cgit v1.1