From: manu Date: Fri, 23 Apr 2010 17:14:27 +0000 (+0000) Subject: 2010-04-23 Manuel López-Ibáñez X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3fee9a699ced8673fdddf7adb766686fe5b69d5c;p=thirdparty%2Fgcc.git 2010-04-23 Manuel López-Ibáñez * toplev.c (general_init): Set default for fdiagnostics-show-option. * opts.c (common_handle_option): Allow disabling it. * common.opt (fdiagnostics-show-option): Add Var. Enabled by default. testsuite/ * gcc.dg/Wconversion-integer.c: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158676 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6b5feae200f0..2ec92ea6583e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2010-04-23 Manuel López-Ibáñez + + * toplev.c (general_init): Set default for + fdiagnostics-show-option. + * opts.c (common_handle_option): Allow disabling it. + * common.opt (fdiagnostics-show-option): Add Var. Enabled by + default. + 2010-04-23 Eric Botcazou * expr.c (expand_expr_real_1) : Only use conversion diff --git a/gcc/common.opt b/gcc/common.opt index 6e9e6965f222..70b2c9050bfb 100644 --- a/gcc/common.opt +++ b/gcc/common.opt @@ -465,7 +465,7 @@ Common Joined RejectNegative -fdiagnostics-show-location=[once|every-line] How often to emit source location at the beginning of line-wrapped diagnostics fdiagnostics-show-option -Common +Common Var(flag_diagnostics_show_option) Init(1) Amend appropriate diagnostic messages with the command line option that controls them fdump- diff --git a/gcc/opts.c b/gcc/opts.c index ce45e1cb0d5d..0009a749daee 100644 --- a/gcc/opts.c +++ b/gcc/opts.c @@ -1766,7 +1766,7 @@ common_handle_option (size_t scode, const char *arg, int value, break; case OPT_fdiagnostics_show_option: - global_dc->show_option_requested = true; + global_dc->show_option_requested = value; break; case OPT_fdump_: diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fc5f35f58a0b..6e32296a3a9c 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2010-04-23 Manuel López-Ibáñez + + * gcc.dg/Wconversion-integer.c: Update. + 2010-04-23 Eric Botcazou * gnat.dg/unchecked_convert5.adb: New test. diff --git a/gcc/testsuite/gcc.dg/Wconversion-integer.c b/gcc/testsuite/gcc.dg/Wconversion-integer.c index b2101076f938..d50b155699b6 100644 --- a/gcc/testsuite/gcc.dg/Wconversion-integer.c +++ b/gcc/testsuite/gcc.dg/Wconversion-integer.c @@ -40,9 +40,9 @@ void h (int x) fuc ('A'); uc = 'A'; - uc = x ? 1U : -1; /* { dg-warning "conversion" } */ + uc = x ? 1U : -1; /* { dg-warning " conversion" } */ /* { dg-warning "negative integer implicitly converted to unsigned type" "" { target *-*-* } 43 } */ - uc = x ? SCHAR_MIN : 1U; /* { dg-warning "conversion" } */ + uc = x ? SCHAR_MIN : 1U; /* { dg-warning " conversion" } */ /* { dg-warning "negative integer implicitly converted to unsigned type" "" { target *-*-* } 45 } */ uc = x ? 1 : -1; /* { dg-warning "negative integer implicitly converted to unsigned type" } */ uc = x ? SCHAR_MIN : 1; /* { dg-warning "negative integer implicitly converted to unsigned type" } */ diff --git a/gcc/toplev.c b/gcc/toplev.c index 996bd900e65a..0dce6ee8e43f 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1694,6 +1694,7 @@ general_init (const char *argv0) /* Set a default printer. Language specific initializations will override it later. */ pp_format_decoder (global_dc->printer) = &default_tree_printer; + global_dc->show_option_requested = flag_diagnostics_show_option; /* Trap fatal signals, e.g. SIGSEGV, and convert them to ICE messages. */ #ifdef SIGSEGV