From patchwork Sun Feb 1 15:10:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 435239 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 E6D9E140161 for ; Mon, 2 Feb 2015 02:11:34 +1100 (AEDT) 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:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=Z1KzvDufUszU2im9K QkfnYz2gOA8H1SoGNM1C5JUxEvETmO3kGRszhXZJwShj8AGLEZOtUxvRD8qQzwJy 7ME62QYYD6YpT6iRSsxjCoNIxT+0Fhy9pJp50xyYcZ3blX7jordVj1VnLqJdMuh0 C6AQ6uCafc752vjqSbWLEM8Xgw= 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:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=qNj/ltdYaNIo5OMheHTlAfO b3xo=; b=uPNoLQXNBp7/sMkmgkqGNLs0k/mAHYD+aLgVP0gwNrVkFLQ9XyEvODZ dIWzRl5CC1TDnz5TiJNLxvLznmjCWE+if1IbhMNvtsgcTb/M8ZP/4Igsy/u7zoll enEaF8gfAP2/ODClCV/UCFyv1VlzROuW48QeRFXZHMBtRCDwjJWw= Received: (qmail 24664 invoked by alias); 1 Feb 2015 15:10:34 -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 24644 invoked by uid 89); 1 Feb 2015 15:10:33 -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-Spam-User: qpsmtpd, 2 recipients 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Sun, 01 Feb 2015 15:10:32 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t11FAVJJ016365 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 1 Feb 2015 10:10:31 -0500 Received: from localhost (ovpn-116-20.ams2.redhat.com [10.36.116.20]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t11FAUUV022609; Sun, 1 Feb 2015 10:10:30 -0500 Date: Sun, 1 Feb 2015 15:10:29 +0000 From: Jonathan Wakely To: libstdc++@gcc.gnu.org Cc: gcc-patches@gcc.gnu.org Subject: Re: [patch] Fix invalid attributes in libstdc++ Message-ID: <20150201151029.GM3360@redhat.com> References: <20150129130229.GJ3360@redhat.com> <20150201150818.GL3360@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150201150818.GL3360@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) On 01/02/15 15:08 +0000, Jonathan Wakely wrote: >I failed to CC gcc-patches on this patch ... > >On 29/01/15 13:02 +0000, Jonathan Wakely wrote: >>Jakub pointed out that we have some attributes that don't use the >>reserved namespace, e.g. __attribute__ ((always_inline)). >> >>This is a 4.9/5 regression and the fix was pre-approved by Jakub so >>I've committed it to trunk. >> >>When we're back in stage1 I'll fix the TODO comments in the new tests >>(see PR64857) and will also rename testsuite/17_intro/headers/c++200x >>to .../c++2011. >> The new test fails on darwin (PR64883) and --enable-threads=single targets (PR64885). This is a workaround for 64883. Tested x86_64-linux, committed to trunk. commit beb7b1c1af3f84a1762eed750c7728f1d10dc333 Author: Jonathan Wakely Date: Sat Jan 31 21:09:31 2015 +0000 PR libstdc++/64883 * include/c_global/cstdio (gets): Use __deprecated__ attribute instead of deprecated. * include/c_std/cstdio (gets): Likewise. * testsuite/17_intro/headers/c++1998/all_attributes.cc: Avoid clashing with attributes used in darwin headers. diff --git a/libstdc++-v3/include/c_global/cstdio b/libstdc++-v3/include/c_global/cstdio index ef024bf..d1c958b 100644 --- a/libstdc++-v3/include/c_global/cstdio +++ b/libstdc++-v3/include/c_global/cstdio @@ -45,7 +45,7 @@ #define _GLIBCXX_CSTDIO 1 #ifndef _GLIBCXX_HAVE_GETS -extern "C" char* gets (char* __s) __attribute__((deprecated)); +extern "C" char* gets (char* __s) __attribute__((__deprecated__)); #endif // Get rid of those macros defined in in lieu of real functions. diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio index 1f8ae7c..37f01ca 100644 --- a/libstdc++-v3/include/c_std/cstdio +++ b/libstdc++-v3/include/c_std/cstdio @@ -45,7 +45,7 @@ #include #ifndef _GLIBCXX_HAVE_GETS -extern "C" char* gets (char* __s) __attribute__((deprecated)); +extern "C" char* gets (char* __s) __attribute__((__deprecated__)); #endif // Get rid of those macros defined in in lieu of real functions. diff --git a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc index c7ed8ae..76a935e 100644 --- a/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc +++ b/libstdc++-v3/testsuite/17_intro/headers/c++1998/all_attributes.cc @@ -22,8 +22,11 @@ // Don't test 'const' because it is reserved anyway. #define abi_tag 1 #define always_inline 1 -#define deprecated 1 -#define noreturn 1 +#ifndef __APPLE__ +// darwin headers use these, see PR 64883 +# define deprecated 1 +# define noreturn 1 +#endif #define packed 1 #define pure 1 #define unused 1