From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26191 invoked by alias); 27 Oct 2012 19:48:41 -0000 Received: (qmail 26173 invoked by uid 48); 27 Oct 2012 19:48:26 -0000 From: "manu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/55077] implement and enable by default -Wliteral-conversion Date: Sat, 27 Oct 2012 19:48:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: manu at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-10/txt/msg02592.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D55077 --- Comment #1 from Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez 2012-10-27 19:48:25 UTC --- Problem: We do not want to warn for expressions. From the clang testcases: // Expressions, such as those that indicate rounding-down, should NOT pro= duce warnings. int x =3D 24 * 0.5; int y =3D (24*60*60) * 0.25; int pennies =3D 123.45 * 100; But gcc folds those before conversion_warning, so we cannot know they are expressions... :-(