aboutsummaryrefslogtreecommitdiff
path: root/build2/diagnostics.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'build2/diagnostics.cxx')
-rw-r--r--build2/diagnostics.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/build2/diagnostics.cxx b/build2/diagnostics.cxx
index d6278a8..7b60d05 100644
--- a/build2/diagnostics.cxx
+++ b/build2/diagnostics.cxx
@@ -106,7 +106,15 @@ namespace build2
{
stream_verb (r.os_, sverb_);
- r << *loc_.file << ':' << loc_.line << ':' << loc_.column << ": ";
+ r << *loc_.file << ':';
+
+ if (loc_.line != 0)
+ r << loc_.line << ':';
+
+ if (loc_.column != 0)
+ r << loc_.column << ':';
+
+ r << ' ';
if (type_ != nullptr)
r << type_ << ": ";