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 c/34389] -Wconversion produces wrong warning



------- Comment #11 from manu at gcc dot gnu dot org  2008-07-30 08:31 -------
Subject: Bug 34389

Author: manu
Date: Wed Jul 30 08:30:32 2008
New Revision: 138296

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=138296
Log:
2008-07-30  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

        PR 34389
        * c-typeck.c (build_binary_op): Encapsulate code into...
        * c-common.c (shorten_binary_op): ...this new function.
        (conversion_warning): Use the new function. Handle non-negative
        constant in bitwise-and.
        * c-common.h (shorten_binary_op): Declare.
cp/
        * typeck.c (build_binary_op): Encapsulate code into
        shorten_binary_op.
testsuite/
        * gcc.dg/Wconversion-pr34389.c: New.
        * g++.dg/warn/Wconversion-pr34389.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/warn/Wconversion-pr34389.C
    trunk/gcc/testsuite/gcc.dg/Wconversion-pr34389.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-common.c
    trunk/gcc/c-common.h
    trunk/gcc/c-typeck.c
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/typeck.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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