diff options
author | Daniel Franke <franke.daniel@gmail.com> | 2010-05-19 12:35:34 -0400 |
---|---|---|
committer | Daniel Franke <dfranke@gcc.gnu.org> | 2010-05-19 12:35:34 -0400 |
commit | daf8c6f03b7b7ae33e2e8e301d367eb8cce80e5c (patch) | |
tree | 64411c68c4c176fc8f0be9929910e6ff86e28d23 /gcc/fortran/options.c | |
parent | f311c3b4a64ad8752904a0261a306bf191e5fcdc (diff) | |
download | gcc-daf8c6f03b7b7ae33e2e8e301d367eb8cce80e5c.zip gcc-daf8c6f03b7b7ae33e2e8e301d367eb8cce80e5c.tar.gz gcc-daf8c6f03b7b7ae33e2e8e301d367eb8cce80e5c.tar.bz2 |
re PR fortran/44055 (Warn (-Wconversion*) when converting single to double precision)
gcc/fortran/:
2010-05-19 Daniel Franke <franke.daniel@gmail.com>
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 <franke.daniel@gmail.com>
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
Diffstat (limited to 'gcc/fortran/options.c')
-rw-r--r-- | gcc/fortran/options.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index 6a5a3db..320dc72 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; |