From patchwork Wed Jan 11 14:30:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Korb X-Patchwork-Id: 135397 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 EDB8BB6EEA for ; Thu, 12 Jan 2012 01:31:16 +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=1326897077; h=Comment: DomainKey-Signature:Received:Received:Received:Received: Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=W63mZ1ZfbGrNh1D9Q5Nt uJXP5bA=; b=BJGoM4HUcKQCvugqJmHZmdCUU5N4Sb/X88Buqujv3fk0yHLwjSOB pURNjs2Puel+rmuogo6BnVUYeV7BOY8OiG2+mAg+6CJhjEpYgziloL7xylKtSaa5 eGfwh4YuixaqX0n2s9+X1uY23gxwa+K2bGAyH5HrLx4Jq0ZBatrbS0g= 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:Message-ID:Date:From:User-Agent:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=DE/+Je94BEEh7mSSZSQ2vt8Xcd23iVdQhIQIfuMJb9vVMj2zYfvg5IltgLz/KU 7yKT26nj1MiI62Vaj9xt/G7Mq9chMEMfFoOrXi3TXRCQY07Qg3MO+W5gY2O4HpzW M2SOKPiYZRf7cTolZDijhOpCLruFlCretFW+Jg7o0r96U=; Received: (qmail 4869 invoked by alias); 11 Jan 2012 14:31:10 -0000 Received: (qmail 4840 invoked by uid 22791); 11 Jan 2012 14:31:08 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from fencepost.gnu.org (HELO fencepost.gnu.org) (140.186.70.10) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 11 Jan 2012 14:30:55 +0000 Received: from adsl-75-0-176-74.dsl.pltn13.sbcglobal.net ([75.0.176.74]:56071 helo=[10.0.0.2]) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1RkzCX-0003eK-MW; Wed, 11 Jan 2012 09:30:53 -0500 Message-ID: <4F0D9D18.6060703@gnu.org> Date: Wed, 11 Jan 2012 06:30:48 -0800 From: Bruce Korb User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111220 Thunderbird/9.0 MIME-Version: 1.0 To: "andreast at gcc dot gnu.org" , GCC Patches Subject: Re: [Bug bootstrap/51705] [4.7 Regression] FreeBSD uses unsupported C++11 features when __cplusplus == 201103L References: In-Reply-To: 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 To eliminate any possible ambiguity, the patch is "approved" On 01/10/12 23:49, andreast at gcc dot gnu.org wrote: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51705 > > Andreas Tobler changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > Status|NEW |ASSIGNED > > --- Comment #46 from Andreas Tobler 2012-01-11 07:49:41 UTC --- > I'm going to apply the patch from comment #45 this evening. > > Bootstraped several times, make check in fixincludes successful. > > This is the CL I prepared: > > 2012-01-11 Bruce Korb > Steven G. Kargl > Andreas Tobler > > PR bootstrap/57105 > PR preprocessor/51776 > * inclhack.def (cdef_cplusplus): Add a replacement for [[noreturn]]. > * fixincl.x: Regenerate. > * tests/base/sys/cdefs.h: Update. > > * genfixes: Remove the 'Ver.' from the version check. > Index: inclhack.def =================================================================== --- inclhack.def (revision 183089) +++ inclhack.def (working copy) @@ -20,6 +20,7 @@ FIXINC_DEBUG = yes; #endif + /* On AIX when _LARGE_FILES is defined stdio.h defines fopen to * fopen64 etc. and this causes problems when building with g++ * because cstdio udefs everything from stdio.h, leaving us with @@ -1028,6 +1029,22 @@ test_text = '#define vfscanf __svfscanf'; }; +/* + * 'g++ -std=c++11' defines __cplusplus to 201103L, which suggests + * that it conforms to ISO/IEC 14882:2011. Until G++ fully conforms, + * it should not set __cplusplus to that value. It currently does + * not support the [[noreturn]] procedure attribute. + * When it does, this hack should be removed. + * SEE: gcc.gnu.org/bugzilla/show_bug.cgi?id=51776 + */ +fix = { + hackname = cdef_cplusplus; + files = sys/cdefs.h; + select = '\[\[noreturn\]\]'; + c_fix = format; + c_fix_arg = '__attribute__((__noreturn__))'; + test_text = "#define _Noreturn [[noreturn]]"; +}; /* * Fix various macros used to define ioctl numbers. Index: tests/base/sys/cdefs.h =================================================================== --- tests/base/sys/cdefs.h (revision 183089) +++ tests/base/sys/cdefs.h (working copy) @@ -9,6 +9,11 @@ +#if defined( CDEF_CPLUSPLUS_CHECK ) +#define _Noreturn __attribute__((__noreturn__)) +#endif /* CDEF_CPLUSPLUS_CHECK */ + + #if defined( FREEBSD_GCC3_BREAKAGE_CHECK ) #if __GNUC__ == 2 && __GNUC_MINOR__ >= 7 #endif /* FREEBSD_GCC3_BREAKAGE_CHECK */ Index: genfixes =================================================================== --- genfixes (revision 183089) +++ genfixes (working copy) @@ -62,7 +62,7 @@ AG="autogen $AG" set -e -if [ -z "`${AG} -v | fgrep 'Ver. 5.'`" ] +if [ -z "`${AG} -v | fgrep ' 5.'`" ] then echo "AutoGen appears to be out of date or not correctly installed." echo "Please download and install:"