aboutsummaryrefslogtreecommitdiff
path: root/odb/parser.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2011-04-25 16:17:50 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2011-04-25 16:17:50 +0200
commitc4af692746181b5bb0ac50489555341feefd943c (patch)
treeb8d90577668165489e7848ed38b4f19ed4cf8ba6 /odb/parser.cxx
parent1a6a0652a6ef5b319cfc8ad05a0acee6910f7560 (diff)
Use out own diagnostic functions to avoid bogus location context
Diffstat (limited to 'odb/parser.cxx')
-rw-r--r--odb/parser.cxx12
1 files changed, 7 insertions, 5 deletions
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 <sstream>
#include <iostream>
+#include <odb/error.hxx>
#include <odb/parser.hxx>
#include <odb/semantics.hxx>
@@ -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_++;
}
}