public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "caibbor at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/59819] New: -Wunused-value reports incorrect values as unused Date: Wed, 15 Jan 2014 06:31:00 -0000 [thread overview] Message-ID: <bug-59819-4@http.gcc.gnu.org/bugzilla/> (raw) http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59819 Bug ID: 59819 Summary: -Wunused-value reports incorrect values as unused Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: trivial Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: caibbor at gmail dot com Created attachment 31836 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31836&action=edit The program in full to replicate this bug This is pretty trivial but the warning outputs incorrect information. given the line: int foo = static_cast< int >( 1, 2, 3 ); G++ reports that value 2 and 3 are not used, when in fact 1 and 2 are not used. G++ 4.8.1's output (with -Wall): test.cpp: In function ‘int main()’: test.cpp:15:35: warning: left operand of comma operator has no effect [-Wunused-value] int foo = static_cast< int >( 1, 2, 3 ); ^ test.cpp:15:38: warning: right operand of comma operator has no effect [-Wunused-value] int foo = static_cast< int >( 1, 2, 3 ); ^ Clang 3.2.7 gets it right, however: test.cpp:15:32: warning: expression result unused [-Wunused-value] int foo = static_cast< int >( 1, 2, 3 ); ^ test.cpp:15:35: warning: expression result unused [-Wunused-value] int foo = static_cast< int >( 1, 2, 3 ); ^ 2 warnings generated. >From gcc-bugs-return-440384-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jan 15 06:55:25 2014 Return-Path: <gcc-bugs-return-440384-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 22011 invoked by alias); 15 Jan 2014 06:55:23 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-bugs.gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/> List-Post: <mailto:gcc-bugs@gcc.gnu.org> List-Help: <mailto:gcc-bugs-help@gcc.gnu.org> Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 21976 invoked by uid 48); 15 Jan 2014 06:55:19 -0000 From: "kirill.yukhin at intel dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug testsuite/59808] [4.9 Regression] r206596 caused: FAIL: gcc.target/i386/sse-14.c (test for excess errors) Date: Wed, 15 Jan 2014 06:55:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: testsuite X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kirill.yukhin at intel dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: <bug-59808-4-q1qkO4oMTt@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-59808-4@http.gcc.gnu.org/bugzilla/> References: <bug-59808-4@http.gcc.gnu.org/bugzilla/> 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-01/txt/msg01526.txt.bz2 Content-length: 347 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59808 --- Comment #4 from Yukhin Kirill <kirill.yukhin at intel dot com> --- (In reply to Uroš Bizjak from comment #2) > Kirill, please update also sse-13.c with new builtins. Fix is posted as part of: http://gcc.gnu.org/ml/gcc-patches/2014-01/msg00761.html I may strip it into separate one... >From gcc-bugs-return-440385-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jan 15 06:56:01 2014 Return-Path: <gcc-bugs-return-440385-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 22750 invoked by alias); 15 Jan 2014 06:56:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-bugs.gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/> List-Post: <mailto:gcc-bugs@gcc.gnu.org> List-Help: <mailto:gcc-bugs-help@gcc.gnu.org> Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 22725 invoked by uid 48); 15 Jan 2014 06:55:57 -0000 From: "kirill.yukhin at intel dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug testsuite/59808] [4.9 Regression] r206596 caused: FAIL: gcc.target/i386/sse-14.c (test for excess errors) Date: Wed, 15 Jan 2014 06:56:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: testsuite X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kirill.yukhin at intel dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: <bug-59808-4-RGwcQpEJJR@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-59808-4@http.gcc.gnu.org/bugzilla/> References: <bug-59808-4@http.gcc.gnu.org/bugzilla/> 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-01/txt/msg01527.txt.bz2 Content-length: 389 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59808 --- Comment #5 from Yukhin Kirill <kirill.yukhin at intel dot com> --- (In reply to Uroš Bizjak from comment #3) > (In reply to Uroš Bizjak from comment #2) > > Kirill, please update also sse-13.c with new builtins. > > And sse-12.c with new options. Sure, I think this is obvious change if no regressions. Will do today. >From gcc-bugs-return-440386-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jan 15 06:57:22 2014 Return-Path: <gcc-bugs-return-440386-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org> Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 23743 invoked by alias); 15 Jan 2014 06:57:21 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-bugs.gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/> List-Post: <mailto:gcc-bugs@gcc.gnu.org> List-Help: <mailto:gcc-bugs-help@gcc.gnu.org> Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 23692 invoked by uid 48); 15 Jan 2014 06:57:18 -0000 From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/59803] [4.8 Regression] s390x -march=z10 reload ICE Date: Wed, 15 Jan 2014 06:57:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 4.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: krebbel at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.3 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: <bug-59803-4-LbF8GF0fH6@http.gcc.gnu.org/bugzilla/> In-Reply-To: <bug-59803-4@http.gcc.gnu.org/bugzilla/> References: <bug-59803-4@http.gcc.gnu.org/bugzilla/> 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-01/txt/msg01528.txt.bz2 Content-length: 793 http://gcc.gnu.org/bugzilla/show_bug.cgi?idY803 --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Thanks, looks good to me in my testing (s390-linux and s390x-linux --enable-checking=release 4.8 branch --with-arch=z196 --with-tune=zEC12 bootstraps/regtests), and it even fixed one FAIL in the testsuite: -FAIL: gcc.dg/torture/vshuf-v32qi.c -O2 (internal compiler error) -FAIL: gcc.dg/torture/vshuf-v32qi.c -O2 (test for excess errors) -UNRESOLVED: gcc.dg/torture/vshuf-v32qi.c -O2 compilation failed to produce executable which apparently ICEd the same way with e.g. -O2 -march=z10 or -O2 -march=z196 without the patch and doesn't with the patch. Though I'd say the #c0 testcase doesn't hurt, can you please add it to say gcc.c-torture/compile/ (or gcc.dg/torture/)?
reply other threads:[~2014-01-15 6:31 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-59819-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).