This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/47659] -Wconversion[-extra] should emit warning for constant expressions


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47659

--- Comment #6 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2011-08-21 16:35:31 UTC ---
Author: tkoenig
Date: Sun Aug 21 16:35:28 2011
New Revision: 177942

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177942
Log:
2011-08-21  Thomas Koenig  <tkoenig@gcc.gnu.org>

    PR fortran/47659
    * expr.c (gfc_check_assign): Check for type conversions when the
    right-hand side is a constant REAL/COMPLEX contstant the left-hand
    side is also REAL/COMPLEX.  Don't warn when a narrowing conversion
    for REAL does not change the value of the constant.

2011-08-21  Thomas Koenig  <tkoenig@gcc.gnu.org>

    PR fortran/47659
    * gfortran.dg/warn_conversion_2.f90:  Also warn about conversion
    of a constant resulting from simplification.
    * gfortran.dg/warn_conversion_3.f90:  New test.


Added:
    trunk/gcc/testsuite/gfortran.dg/warn_conversion_3.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/expr.c
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gfortran.dg/warn_conversion_2.f90


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]