[patch, fortran] PR44055 - conditionally re-enable conversion warnings

Daniel Franke franke.daniel@gmail.com
Mon May 10 22:58:00 GMT 2010


As requested by Tobias, here's a follow-up to the latest changes regarding
-Wconversion.

The patch adds the sanitized -Wconversion to -Wall, but does not add
-Wconversion-extra to -Wextra as I first intended to. The new option mostly 
behaves like -Wconversion did before -- too much noise, even for -Wextra.

The warnings got phrased slightly more neutral so that they can be used for 
both options.


gcc/fortran/:
2010-05-10  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 W-conversion to -Wall; document new behaviour of 
	-Wconversion; document -Wconversion-extra.


gcc/testsuite/:
2010-05-10  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.


Regression tested on i686-pc-linux-gnu.
Ok for trunk?

	Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: warn_conversion_2.f90
Type: text/x-fortran
Size: 139 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100510/4fef675a/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr44055.diff
Type: text/x-patch
Size: 7263 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100510/4fef675a/attachment-0001.bin>


More information about the Gcc-patches mailing list