From 8abb6b2217202164ea30559a793ddbe364bfdd7f Mon Sep 17 00:00:00 2001 From: Per Bothner Date: Mon, 28 Mar 2005 00:04:41 -0800 Subject: [PATCH] Make -f[no-]show-column also control non-cpp diagnostics. * c.opt (fshow-column): Move option from here ... * common.opt (fshow-column): ... to here. * diagnostic.c (diagnostic_build_prefix): Only print column number if flag_show_column. From-SVN: r97127 --- gcc/ChangeLog | 8 ++++++++ gcc/c.opt | 4 +--- gcc/common.opt | 6 +++++- gcc/diagnostic.c | 2 +- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 90a003260d5..eb471ba5190 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2005-03-26 Per Bothner + + Make -f[no-]show-column also control non-cpp diagnostics. + * c.opt (fshow-column): Move option from here ... + * common.opt (fshow-column): ... to here. + * diagnostic.c (diagnostic_build_prefix): Only print column number + if flag_show_column. + 2005-03-27 Steven Bosscher * vax-protos.h (vax_output_int_move, vax_output_int_add, diff --git a/gcc/c.opt b/gcc/c.opt index 5613dd49d37..8efeae423c6 100644 --- a/gcc/c.opt +++ b/gcc/c.opt @@ -18,6 +18,7 @@ ; Software Foundation, 59 Temple Place - Suite 330, Boston, MA ; 02111-1307, USA. +; See the GCC internals manual for a description of this file's format. ; Please try to keep this file in ASCII collating order. @@ -606,9 +607,6 @@ fshort-wchar C ObjC C++ ObjC++ Force the underlying type for \"wchar_t\" to be \"unsigned short\" -fshow-column -C ObjC C++ ObjC++ - fsigned-bitfields C ObjC C++ ObjC++ When \"signed\" or \"unsigned\" is not given make the bitfield signed diff --git a/gcc/common.opt b/gcc/common.opt index d4cd60cd12d..e53949d6b23 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -19,7 +19,7 @@ ; Software Foundation, 59 Temple Place - Suite 330, Boston, MA ; 02111-1307, USA. -; See c.opt for a description of this file's format. +; See the GCC internals manual for a description of this file's format. ; Please try to keep this file in ASCII collating order. @@ -732,6 +732,10 @@ fshared-data Common Report Var(flag_shared_data) Mark data as shared rather than private +fshow-column +Common C ObjC C++ ObjC++ Report Var(flag_show_column) Init(1) +Show column numbers in diagnostics, when available. Default on. + fsignaling-nans Common Report Var(flag_signaling_nans) Disable optimizations observable by IEEE signaling NaNs diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c index 39b46fc7aef..5d10f0cb211 100644 --- a/gcc/diagnostic.c +++ b/gcc/diagnostic.c @@ -141,7 +141,7 @@ diagnostic_build_prefix (diagnostic_info *diagnostic) (s.file == NULL ? build_message_string ("%s: %s", progname, text) #ifdef USE_MAPPED_LOCATION - : s.column != 0 + : flag_show_column && s.column != 0 ? build_message_string ("%s:%d:%d: %s", s.file, s.line, s.column, text) #endif : build_message_string ("%s:%d: %s", s.file, s.line, text)); -- 2.30.2