From patchwork Thu Jan 12 21:17:38 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerald Pfeifer X-Patchwork-Id: 135692 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]) by ozlabs.org (Postfix) with SMTP id CC828B6FD3 for ; Fri, 13 Jan 2012 08:16:49 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1327007811; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Date: From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type:Mailing-List:Precedence:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=coUJtSOiLRmczit0PHZzey+P9fY=; b=sCH+w5qDXS3dPHG PMthFXllR0XptuuHAczhCwbvIk7hq3D3PWU0NphmIE3TVuvJBKjYXRwgSG6QYDfL Stij5pAt08SWGSk3jkFzL6lnottUkZh4fIDHG+USbC7JfD+TaSQCK7cqxfXmf+eE 1JB9U6DMYO8l78rPkspNiX4OZHOA= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:MIME-Version:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=Gu2PqlfA2x8HnSEcXxbkAptHcsErNuy+DbJQvt+IWkSgbM5/mfF+PkIvKa6Ps1 nqvpPnSd9mnH+jGJZOTz6KW/Bkj5hPTwMVUDhNd07c1lu02Bo5vP5KOkI8cvclqc E+cwylByvusXkllnSd2SnbuRB2wAJBWuC0cJHwv59A31M=; Received: (qmail 3496 invoked by alias); 12 Jan 2012 21:16:47 -0000 Received: (qmail 3486 invoked by uid 22791); 12 Jan 2012 21:16:46 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=BAYES_00 X-Spam-Check-By: sourceware.org Received: from ainaz.pair.com (HELO ainaz.pair.com) (209.68.2.66) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 12 Jan 2012 21:16:33 +0000 Received: from K43.suse.de (nat.nue.novell.com [195.135.221.2]) by ainaz.pair.com (Postfix) with ESMTPSA id EECE73F417; Thu, 12 Jan 2012 16:16:31 -0500 (EST) Date: Thu, 12 Jan 2012 22:17:38 +0100 (CET) From: Gerald Pfeifer To: Benjamin Kosnik cc: gcc-patches@gcc.gnu.org, Jakub Jelinek Subject: Re: [wwwdocs] gcc-4.7/porting_to.html In-Reply-To: <20120111161110.5b66d228@shotwell> Message-ID: References: <20120111161110.5b66d228@shotwell> MIME-Version: 1.0 X-IsSubscribed: yes 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 On Wed, 11 Jan 2012, Benjamin Kosnik wrote: > I thought it better to get this in, warts and all, and have it be > corrected than to dally around again and have it not checked in. Awesome. Seeing the validator errors, I figured I'll try and help, alas you only left a single one for me -- patch at the end. :-) + At no time, should user-level code use private Extra comma? + The C++ compiler no longer performs an extra unqualified lookups that + had performed in the past, namely dependant base class scope lookups and Grammaros? + C++ programs that depended on the compiler's previous behavior may + longer compile. For example, code such as "no" missing here. :) +

+ To fix this, rename the inner variable from i to a + distinct identifier. +

"...rename one of the two variables..." I went ahead and created a small patch with the changes above which is the second patch below and committed it. If you'd like to see some changes, just let me know. Gerald Index: porting_to.html =================================================================== RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.7/porting_to.html,v retrieving revision 1.3 diff -u -3 -p -r1.3 porting_to.html --- porting_to.html 12 Jan 2012 02:52:22 -0000 1.3 +++ porting_to.html 12 Jan 2012 19:30:46 -0000 @@ -204,9 +204,7 @@ int main() } -

-Now results in the error: -

+

Now results in the error:

 error: redeclaration of ‘int i’

Index: porting_to.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.7/porting_to.html,v
retrieving revision 1.5
diff -u -3 -p -r1.5 porting_to.html
--- porting_to.html	12 Jan 2012 19:35:29 -0000	1.5
+++ porting_to.html	12 Jan 2012 21:14:06 -0000
@@ -94,24 +94,25 @@ Fixing this issue is easy: just include 
 

Note on proper checking for thread support

-At no time, should user-level code use private +At no time should user-level code use private GCC-implementation-space macros such as -_GLIBCXX_HAS_GTHREADS to determine at compile-time -concurrency support. Instead, use the POSIX -macro _REENTRANT. +_GLIBCXX_HAS_GTHREADS to determine concurrency support +at compile-time +Instead, use the POSIX macro _REENTRANT.

Name lookup changes

-The C++ compiler no longer performs an extra unqualified lookups that -had performed in the past, namely dependant base class scope lookups and -unqualified template function +The C++ compiler no longer performs some extra unqualified lookups it +had performed in the past, namely +dependant base class scope lookups +and unqualified template function lookups.

-C++ programs that depended on the compiler's previous behavior may +C++ programs that depended on the compiler's previous behavior may no longer compile. For example, code such as

@@ -195,7 +196,7 @@ error: ‘int i’ previously de

-To fix this, rename the inner variable from i to a +To fix this, rename one of the two variables from i to a distinct identifier.