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

--- Comment #28 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
Author: manu
Date: Wed Nov 20 07:15:40 2013
New Revision: 205090

URL: http://gcc.gnu.org/viewcvs?rev=205090&root=gcc&view=rev
Log:
2013-11-19  Joshua J Cogliati  <jrinc...@yahoo.com>

    PR c/53001
    Splitting out a -Wfloat-conversion from -Wconversion for
    conversions that lower floating point number precision
    or conversion from floating point numbers to integers.

gcc/c-family/

    * c-common.c (unsafe_conversion_p): Make this function
    return an enumeration with more detail.
    (conversion_warning): Use the new return type of
    unsafe_conversion_p to separately warn either about conversions
    that lower floating point number precision or about the other
    kinds of conversions.
     * c-common.h (enum conversion_safety): New enumeration.
     (unsafe_conversion_p): switching return type to
     conversion_safety enumeration.
    * c.opt: Adding new warning -Wfloat-conversion and
    enabling it with -Wconversion.

gcc/

    * doc/invoke.texi: Adding documentation about
    -Wfloat-conversion.

gcc/testsuite/

    * c-c++-common/Wfloat-conversion.c: Copies relevant
    tests from c-c++-common/Wconversion-real.c,
    gcc.dg/Wconversion-real-integer.c and gcc.dg/pr35635.c into
    new testcase for conversions that are warned about by
    -Wfloat-conversion.

Added:
    trunk/gcc/testsuite/c-c++-common/Wfloat-conversion.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-common.c
    trunk/gcc/c-family/c-common.h
    trunk/gcc/c-family/c.opt
    trunk/gcc/doc/invoke.texi
    trunk/gcc/testsuite/ChangeLog

Reply via email to