http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47660
Summary: Retain warning text of -Wconversion messages when -Wconversion-extra is in effect Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: thenl...@users.sourceforge.net A warning for a construct which is printed for -Wconversion should be printed with the same text when -Wconversion-extra is in effect. In other words, when -Wconversion-extra is in effect, conversions which are likely to change the expression's value should have a distinctly different warning text than conversions which don't. This makes it easier for the user to find the most relevant issues in the source code more quickly without running the compiler two times with -Wconversion and -Wconversion-extra. For example: real(4) r1 real(8) r2 integer(4) i r1 = r2 r1 = 0_8 i = 0._8 end $ gfortran -Wconversion testconv2.f90 testconv2.f90:4.5: r1 = r2 1 Warning: Possible change of value in conversion from REAL(8) to REAL(4) at (1) testconv2.f90:5.5: r1 = 0_8 1 Warning: Possible change of value in conversion from INTEGER(8) to REAL(4) at (1 ) testconv2.f90:6.4: i = 0._8 1 Warning: Possible change of value in conversion from REAL(8) to INTEGER(4) at (1 ) $ gfortran -Wconversion-extra testconv2.f90 testconv2.f90:4.5: r1 = r2 1 Warning: Conversion from REAL(8) to REAL(4) at (1) testconv2.f90:5.5: r1 = 0_8 1 Warning: Conversion from INTEGER(8) to REAL(4) at (1) testconv2.f90:6.4: i = 0._8 1 Warning: Possible change of value in conversion from REAL(8) to INTEGER(4) at (1) The first two warnings should have the same text in both runs.