From patchwork Sun Apr 12 11:02:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerald Pfeifer X-Patchwork-Id: 460475 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 730C114011D for ; Sun, 12 Apr 2015 21:02:28 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=D/1dPF9g; dkim-adsp=none (unprotected policy); dkim-atps=neutral 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:in-reply-to:message-id:references:mime-version :content-type; q=dns; s=default; b=I9FbqoZWz7UumfEX8LKoMPHHLfxXN Q2snYTHAJY5Yi5cn3tVvvyuNTK5blEc42Tws2kPEVqScl7SEbPBo8VB06QX6FSx6 rHLD/h198ouW5kZet9u5FHMyDY9rJfEcGosF4UaM5WX6pEk7lXVWn6guGDWyEu8G JW5cCUR0vKmFJk= 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:in-reply-to:message-id:references:mime-version :content-type; s=default; bh=QTu5aBIiQG7oy6JP3cE8pfF+/WA=; b=D/1 dPF9gfT5gvdWDvXxLd8nw5tJ7XI7p6WRC4U8YQtZV/uPs9p0VPmzcygSGhUnEw4f coT903QDENFAr82QTSanGqm//tDuDXUzTroJ7DjJO6iZeJoZseBX+6cs68W8913i SQNxsYx+dnDGSoJJhPUZyzkMbez5Osn7e+gooTJY= Received: (qmail 96734 invoked by alias); 12 Apr 2015 11:02:20 -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 96719 invoked by uid 89); 12 Apr 2015 11:02:20 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=AWL, BAYES_00, SPF_PASS, UNSUBSCRIBE_BODY autolearn=no version=3.3.2 X-HELO: ainaz.pair.com Received: from ainaz.pair.com (HELO ainaz.pair.com) (209.68.2.66) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sun, 12 Apr 2015 11:02:18 +0000 Received: from tuna (ip-109-43-0-170.web.vodafone.de [109.43.0.170]) by ainaz.pair.com (Postfix) with ESMTPSA id 8E6B13F419; Sun, 12 Apr 2015 07:02:14 -0400 (EDT) Date: Sun, 12 Apr 2015 13:02:12 +0200 (CEST) From: Gerald Pfeifer To: Benjamin De Kosnik , gcc-patches@gcc.gnu.org Subject: Re: [wwwdocs] gcc-4.8/porting_to.html In-Reply-To: <20130313022916.0728c82e@oakwood> Message-ID: References: <20130313022916.0728c82e@oakwood> MIME-Version: 1.0 X-IsSubscribed: yes On Wed, 13 Mar 2013, Benjamin De Kosnik wrote: > Hey! Here is the first pass at the 4.8 porting documentation. Lovely, thank you, I know this really has proven useful. And with some unfortunate of delay, some updates from my side: - Use run-time performance (instead of runtime performance which Sandra established as the performance of the runtime, I think). - Code does not use warning options per se. - Undefined behavior is undefined regardless of how involved optimizers are. - Improve markup, fix grammar, break long lines. - Refer to GNU/Linux. Applied. Gerald Index: porting_to.html =================================================================== RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.8/porting_to.html,v retrieving revision 1.5 diff -u -r1.5 porting_to.html --- porting_to.html 11 Jun 2014 18:49:26 -0000 1.5 +++ porting_to.html 12 Apr 2015 00:14:41 -0000 @@ -13,7 +13,7 @@ changes. Some of these are a result of bug fixing, and some old behaviors have been intentionally changed in order to support new standards, or relaxed -in standards-conforming ways to facilitate compilation or runtime +in standards-conforming ways to facilitate compilation or run-time performance. Some of these changes are not visible to the naked eye and will not cause problems when updating from older versions.

@@ -31,9 +31,8 @@

Improvements to the GCC infrastructure allow improvements in the ability of several existing warnings to spot problematic code. As -such, new warnings may exist for previously warning-free code that -uses --Wmaybe-uninitialized. +such, new warnings may exist for previously warning-free code when +using -Wmaybe-uninitialized.

Although these warnings will @@ -49,8 +48,8 @@

More aggressive loop optimizations

Improvements to the GCC infrastructure allow improvements in -the ability of the optimizers to transform loops. Some loops that previously -invoked undefined behavior may now be turned into endless loops. +the ability of the optimizers to transform loops. Some loops that +invoke undefined behavior may now be turned into endless loops.

For example,

@@ -68,7 +67,8 @@

-When fd is 64 or above, fd * 0x02000001 overflows, which is invalid in C/C++ for signed ints. +When fd is 64 or above, fd * 0x02000001 overflows, which is invalid for +signed ints in C/C++.

@@ -119,13 +119,13 @@ ^ -

Although these warnings will not result in compilation failure, -often -Wall is used in conjunction with +

Although these warnings will not result in compilation failure per +se, often -Wall is used in conjunction with -Werror and as a result, new warnings are turned into new errors.

-

To fix, either re-write to use memcpy or dereference the last argument in the -offending memset call.

+

To fix, either re-write to use memcpy or dereference the +last argument in the offending memset call.

As a workaround, use -Wno-sizeof-pointer-memaccess. @@ -134,7 +134,7 @@

Pre-processor pre-includes

-The GCC pre-processor may now pre-includes a file that defines certain +The GCC pre-processor may now pre-include a file that defines certain macros for the entirety of the translation unit. This allows fully conformant implementations of C99/C11 and other standards that require compiler or compiler + runtime macros that describe @@ -142,7 +142,7 @@

-On linux, <stdc-predef.h> is pre-included. +On GNU/Linux, <stdc-predef.h> is pre-included.

@@ -154,8 +154,9 @@ /usr/include/stdc-predef.h:0: error: Syntax error near '3' -

As a workaround, the stdc-predef.h preinclude can be disabled with -the use of -ffreestanding. For non C/C++ code, use the pre-processor flag -P. +

As a workaround, the stdc-predef.h pre-include can be disabled with +the use of -ffreestanding. For non C/C++ code, use the +pre-processor flag -P.

C++ language issues