re PR c++/54941 (do not print line/column numbers for <built-in>:0:0)

2013-09-08  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/54941
	* diagnostic.c (diagnostic_build_prefix): When s.file is
	"<built-in>" don't output line and column numbers.

/testsuite
2013-09-08  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/54941
	* g++.dg/overload/new1.C: Adjust.

From-SVN: r202366
This commit is contained in:
Paolo Carlini 2013-09-08 14:30:27 +00:00
parent 2e6a2f88ac
commit 97f1f314fe
5 changed files with 18 additions and 5 deletions

View File

@ -1,8 +1,8 @@
2013-09-08 Tom de Vries <tom@codesourcery.com>
2013-09-08 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58282
* except.c (build_must_not_throw_expr): Handle
flag_exceptions.
PR c++/54941
* diagnostic.c (diagnostic_build_prefix): When s.file is
"<built-in>" don't output line and column numbers.
2013-09-06 Jan Hubicka <jh@suse.cz>

View File

@ -1,3 +1,9 @@
2013-09-08 Tom de Vries <tom@codesourcery.com>
PR c++/58282
* except.c (build_must_not_throw_expr): Handle
flag_exceptions.
2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
* typeck.c (cp_build_binary_op): Use vector_types_compatible_elements_p.

View File

@ -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_("<built-in>"))
? 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)

View File

@ -1,3 +1,8 @@
2013-09-08 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/54941
* g++.dg/overload/new1.C: Adjust.
2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
* c-c++-common/opaque-vector.c: New test.

View File

@ -17,6 +17,5 @@ void f(X *x = new (3) X(6)); // { dg-error "" }
void f(X *x = new (2) X[10]); // { dg-error "" }
// { dg-message "candidate" "candidate note" { target *-*-* } 18 }
// { dg-message "operator new|candidate expects" "match candidate text" { target *-*-* } 00 }
void f(X *x = new X[10][5]); // { dg-error "" }