From patchwork Fri Mar 7 19:45:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 328063 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 503FE2C009E for ; Sat, 8 Mar 2014 06:45:31 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; q=dns; s=default; b=daxwrm0h0XoCR0ks6h6nKPKcL7R3xl b7Pm+WTGZXv71Fu3WCI061RlTJPhJpA6yI+Ar0nAfnUEyG56eVfdLxfh2BYppR6G JzmO/s209O5g+/dpFpYpXm296VKLHyaYVzGTWr3nNIY7Evb6MtgsZWPdhaXWsCu0 8M+XiS2RnwGZE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; s=default; bh=MWXhgovZrg/XkE47ic24v5o0mGo=; b=myr+ jplECjoGI+6cjkYAELfNaatg1CCkvlUGl7kvHs5K64TI+G50XT1ha7gD8ScrDv7P xLgCgi0P9nHUj3a7jj0iGOvyikOSCnCGp9rBxJwjAaGArAEBn0Td/Q0HxDZwZKVx RubSvpPzLk+u/e54ca92qDUuHGg/WnF9bvB7NO4= Received: (qmail 26248 invoked by alias); 7 Mar 2014 19:45:23 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 26234 invoked by uid 89); 7 Mar 2014 19:45:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 07 Mar 2014 19:45:21 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s27JjKii025630 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 7 Mar 2014 14:45:20 -0500 Received: from localhost (vpn1-6-254.ams2.redhat.com [10.36.6.254]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s27JjIvH010305 for ; Fri, 7 Mar 2014 14:45:19 -0500 Date: Fri, 7 Mar 2014 19:45:17 +0000 From: Jonathan Wakely To: gcc-patches@gcc.gnu.org Subject: Re: [wwwdocs] Add "Porting to GCC 4.9" document Message-ID: <20140307194517.GA29739@redhat.com> References: <20140304223211.GA22968@redhat.com> <20140307180821.GA15886@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20140307180821.GA15886@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) On 07/03/14 18:08 +0000, Jonathan Wakely wrote: >On 04/03/14 22:32 +0000, Jonathan Wakely wrote: >>I've added an initial "Porting to GCC 4.9" page at >>http://gcc.gnu.org/gcc-4.9/porting_to.html >> >>So far it only contains a couple of C++ changes that caused some >>failures during mass rebuilds, other additions are welcome. > >The attached patch adds some more changes (thanks to Jakub for the >OpenMP one) and links to the porting guide form gcc-4.9/changes.html This patch adds a note about a new warning (thanks to Marek), which caused some build failures in binutils and gdb. ? .porting_to.html.swp Index: porting_to.html =================================================================== RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.9/porting_to.html,v retrieving revision 1.3 diff -u -r1.3 porting_to.html --- porting_to.html 7 Mar 2014 19:19:51 -0000 1.3 +++ porting_to.html 7 Mar 2014 19:42:36 -0000 @@ -60,9 +60,32 @@ #pragma omp end declare target directive, this is now a parsing error.

- + +

Right operand of comma operator without effect

+ +

GCC now warns about unused right-hand side of a comma expression that +contains no side effects:

+ +

+  int i = 42; 
+  bar (), i;
+
+ +

This example now gives the following diagnostic:

+ +
+w.c:5:9: warning: right-hand operand of comma expression has no effect [-Wunused-value]
+   bar (), i;
+         ^
+
+ +

To suppress this warning cast the right-hand operand to void:

+ +

+  int i = 42; 
+  bar (), (void) i;
+

C++ language issues