aboutsummaryrefslogtreecommitdiff
path: root/gcc/diagnostic.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/diagnostic.c')
-rw-r--r--gcc/diagnostic.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c
index f323f363ae5..8d012491577 100644
--- a/gcc/diagnostic.c
+++ b/gcc/diagnostic.c
@@ -1,6 +1,6 @@
/* Language-independent diagnostic subroutines for the GNU Compiler Collection
- Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
- Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+ 2009 Free Software Foundation, Inc.
Contributed by Gabriel Dos Reis <gdr@codesourcery.com>
This file is part of GCC.
@@ -126,6 +126,7 @@ diagnostic_set_info_translated (diagnostic_info *diagnostic, const char *msg,
diagnostic->message.args_ptr = args;
diagnostic->message.format_spec = msg;
diagnostic->location = location;
+ diagnostic->override_column = 0;
diagnostic->kind = kind;
diagnostic->option_index = 0;
}
@@ -153,6 +154,8 @@ diagnostic_build_prefix (diagnostic_info *diagnostic)
};
const char *text = _(diagnostic_kind_text[diagnostic->kind]);
expanded_location s = expand_location (diagnostic->location);
+ if (diagnostic->override_column)
+ s.column = diagnostic->override_column;
gcc_assert (diagnostic->kind < DK_LAST_DIAGNOSTIC_KIND);
return