From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9588 invoked by alias); 5 Feb 2014 17:58:02 -0000 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 Received: (qmail 9001 invoked by uid 48); 5 Feb 2014 17:57:59 -0000 From: "chengniansun at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/60083] New: Duplicate conversion warnings from negative integer to unsigned type (gcc-4.3 emits only one warning) Date: Wed, 05 Feb 2014 17:58:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: chengniansun at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-02/txt/msg00474.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D60083 Bug ID: 60083 Summary: Duplicate conversion warnings from negative integer to unsigned type (gcc-4.3 emits only one warning) Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: chengniansun at gmail dot com I have the following code, and gcc-trunk emits duplicate warnings on the implicit conversion from negative long long to unsigned short.=20 Moreover, if I turn on -O1, gcc emits only one warning, but the message cha= nges to "large integer implicitly truncated to unsigned type". Lastly, gcc-4.3 only emits one warning for this conversion.=20 $: cat s.c int *const a =3D 0; unsigned fn1() { unsigned short s =3D ~0x4578ADBCAA1DE677LL ^ a =3D=3D 0; return s; } $: gcc-trunk -c -Wconversion s.c s.c: In function =E2=80=98fn1=E2=80=99: s.c:3:22: warning: negative integer implicitly converted to unsigned type [-Wsign-conversion] unsigned short s =3D ~0x4578ADBCAA1DE677LL ^ a =3D=3D 0; ^ s.c:3:22: warning: negative integer implicitly converted to unsigned type [-Wsign-conversion] $: gcc-trunk -c -O1 -Wconversion s.c s.c: In function =E2=80=98fn1=E2=80=99: s.c:3:22: warning: large integer implicitly truncated to unsigned type [-Woverflow] unsigned short s =3D ~0x4578ADBCAA1DE677LL ^ a =3D=3D 0; ^ $: gcc-4.3 -c -O1 -Wconversion s.c s.c: In function =E2=80=98fn1=E2=80=99: s.c:3: warning: large integer implicitly truncated to unsigned type $: >>From gcc-bugs-return-442718-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Feb 05 18:00:40 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 11695 invoked by alias); 5 Feb 2014 18:00:40 -0000 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 Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 11627 invoked by uid 48); 5 Feb 2014 18:00:36 -0000 From: "bernd.edlinger at hotmail dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/57748] [4.7/4.8/4.9 Regression] ICE when expanding assignment to unaligned zero-sized array Date: Wed, 05 Feb 2014 18:00:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 4.8.0 X-Bugzilla-Keywords: ice-on-valid-code, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: bernd.edlinger at hotmail dot de X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-02/txt/msg00475.txt.bz2 Content-length: 219 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57748 --- Comment #54 from Bernd Edlinger --- (In reply to Marek Polacek from comment #53) > So fixed on the trunk? yes, fixed on trunk.