From daf8c6f03b7b7ae33e2e8e301d367eb8cce80e5c Mon Sep 17 00:00:00 2001 From: Daniel Franke Date: Wed, 19 May 2010 12:35:34 -0400 Subject: re PR fortran/44055 (Warn (-Wconversion*) when converting single to double precision) gcc/fortran/: 2010-05-19 Daniel Franke PR fortran/44055 * lang.opt (Wconversion-extra): New option. * gfortran.h (gfc_option_t): Add warn_conversion_extra. * options.c (gfc_init_options): Disable -Wconversion-extra by default. (set_Wall): Enable -Wconversion. (gfc_handle_option): Set warn_conversion_extra. * intrinsic.c (gfc_convert_type_warn): Ignore kind conditions introduced for -Wconversion if -Wconversion-extra is present. * invoke.texi: Add -Wconversion to -Wall; document new behaviour of -Wconversion; document -Wconversion-extra. gcc/testsuite/: 2010-05-19 Daniel Franke PR fortran/44055 * gfortran.dg/c_sizeof_2.f90: Add -Wno-conversion to dg-options; Fixed scope of C_SIZEOF. * gfortran.dg/warn_conversion_2.f90: New. From-SVN: r159586 --- gcc/fortran/options.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gcc/fortran/options.c') diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index 6a5a3db6f3b..320dc722b2c 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -78,6 +78,7 @@ gfc_init_options (unsigned int argc, const char **argv) gfc_option.warn_character_truncation = 0; gfc_option.warn_array_temp = 0; gfc_option.warn_conversion = 0; + gfc_option.warn_conversion_extra = 0; gfc_option.warn_implicit_interface = 0; gfc_option.warn_line_truncation = 0; gfc_option.warn_surprising = 0; @@ -402,6 +403,7 @@ set_Wall (int setting) { gfc_option.warn_aliasing = setting; gfc_option.warn_ampersand = setting; + gfc_option.warn_conversion = setting; gfc_option.warn_line_truncation = setting; gfc_option.warn_surprising = setting; gfc_option.warn_tabs = !setting; @@ -568,6 +570,10 @@ gfc_handle_option (size_t scode, const char *arg, int value, gfc_option.warn_conversion = value; break; + case OPT_Wconversion_extra: + gfc_option.warn_conversion_extra = value; + break; + case OPT_Wimplicit_interface: gfc_option.warn_implicit_interface = value; break; -- cgit v1.2.1