Commit 97f1f314 by Paolo Carlini

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
parent 2e6a2f88
2013-09-08 Tom de Vries <tom@codesourcery.com> 2013-09-08 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58282 PR c++/54941
* except.c (build_must_not_throw_expr): Handle * diagnostic.c (diagnostic_build_prefix): When s.file is
flag_exceptions. "<built-in>" don't output line and column numbers.
2013-09-06 Jan Hubicka <jh@suse.cz> 2013-09-06 Jan Hubicka <jh@suse.cz>
......
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> 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
* typeck.c (cp_build_binary_op): Use vector_types_compatible_elements_p. * typeck.c (cp_build_binary_op): Use vector_types_compatible_elements_p.
......
...@@ -245,6 +245,9 @@ diagnostic_build_prefix (diagnostic_context *context, ...@@ -245,6 +245,9 @@ diagnostic_build_prefix (diagnostic_context *context,
(s.file == NULL (s.file == NULL
? build_message_string ("%s%s:%s %s%s%s", locus_cs, progname, locus_ce, ? build_message_string ("%s%s:%s %s%s%s", locus_cs, progname, locus_ce,
text_cs, text, text_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 : context->show_column
? build_message_string ("%s%s:%d:%d:%s %s%s%s", locus_cs, s.file, s.line, ? 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) s.column, locus_ce, text_cs, text, text_ce)
......
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> 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
* c-c++-common/opaque-vector.c: New test. * c-c++-common/opaque-vector.c: New test.
......
...@@ -17,6 +17,5 @@ void f(X *x = new (3) X(6)); // { dg-error "" } ...@@ -17,6 +17,5 @@ void f(X *x = new (3) X(6)); // { dg-error "" }
void f(X *x = new (2) X[10]); // { dg-error "" } void f(X *x = new (2) X[10]); // { dg-error "" }
// { dg-message "candidate" "candidate note" { target *-*-* } 18 } // { 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 "" } void f(X *x = new X[10][5]); // { dg-error "" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment