From c4af692746181b5bb0ac50489555341feefd943c Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 25 Apr 2011 16:17:50 +0200 Subject: Use out own diagnostic functions to avoid bogus location context --- odb/parser.cxx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'odb/parser.cxx') diff --git a/odb/parser.cxx b/odb/parser.cxx index a40a298..c5397a1 100644 --- a/odb/parser.cxx +++ b/odb/parser.cxx @@ -12,6 +12,7 @@ #include #include +#include #include #include @@ -1541,9 +1542,9 @@ create_type (tree t, } else { - cerr << file << ':' << line << ':' << clmn << ": error: " - << " non-integer array index " - << tree_code_name[TREE_CODE (max)]; + error (file, line, clmn) + << "non-integer array index " << tree_code_name[TREE_CODE (max)] + << endl; throw failed (); } @@ -1907,8 +1908,9 @@ diagnose_unassoc_pragmas (decl_set const& decls) if (i->prag && !i->assoc) { pragma const& p (*i->prag); - error_at (p.loc, "odb pragma %qs is not associated with a declaration", - p.name.c_str ()); + error (p.loc) + << "odb pragma '" << p.name << "' is not associated with a " + << "declaration" << endl; error_++; } } -- cgit v1.1