From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17988 invoked by alias); 9 Apr 2015 23:28:35 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 17977 invoked by uid 89); 9 Apr 2015 23:28:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham 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; Thu, 09 Apr 2015 23:28:31 +0000 Received: from tuna.dhcp.nue.suse.com (nat.nue.novell.com [195.135.221.2]) by ainaz.pair.com (Postfix) with ESMTPSA id 6805B3F4CD; Thu, 9 Apr 2015 19:28:28 -0400 (EDT) Date: Thu, 09 Apr 2015 23:28:00 -0000 From: Gerald Pfeifer To: Jakub Jelinek , Jonathan Wakely cc: gcc-patches@gcc.gnu.org, Ed Smith-Rowland <3dw4rd@verizon.net> Subject: Re: [wwwdocs] Document __has_attribute in /gcc-5/changes.html In-Reply-To: <20150407090952.GZ9755@redhat.com> Message-ID: References: <20150311180911.GB4981@redhat.com> <20150311181450.GO1746@tucnak.redhat.com> <20150311184201.GC4981@redhat.com> <20150407090952.GZ9755@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00422.txt.bz2 On Tue, 7 Apr 2015, Jakub Jelinek wrote: > This change looks problematic to me, as there is no has_attribute macro, > the "has_attribute macros" phrase was meant to stand for > "__has_attribute and __has_cpp_attribute macros". > For I assume we want exact spelling. Yes, that's a very good point. On Tue, 7 Apr 2015, Jonathan Wakely wrote: > The referenced SD-6 document shows the values and format: > http://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations > > I would expect that most people using the macros are going to be > referring to that document anyway. This is a fair point as well. Thanks for your feedback, Jakub and Jonathan. This is what I just committed. Gerald Index: changes.html =================================================================== RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-5/changes.html,v retrieving revision 1.99 diff -u -r1.99 changes.html --- changes.html 9 Apr 2015 15:05:01 -0000 1.99 +++ changes.html 9 Apr 2015 23:26:37 -0000 @@ -262,7 +262,7 @@ of the standard directive #include and the extension #include_next respectively. -
  • A new built-in function-like macro to detect the existence of an +
  • A new built-in function-like macro to determine the existence of an attribute, __has_attribute, has been added. The equivalent built-in macro __has_cpp_attribute was added to C++ to support @@ -279,11 +279,12 @@ #endif foo(int x); - If an attribute exists a nonzero constant integer is returned. + If an attribute exists, a nonzero constant integer is returned. For standardized C++ attributes a date is returned, otherwise the constant returned is 1. - The has_attribute macros will add underscores to an attribute name - if necessary to resolve the name. + Both __has_attribute and + __has_cpp_attribute will add underscores to an + attribute name if necessary to resolve the name. For C++11 and onwards the attribute may be scoped.
  • A new set of built-in functions for arithmetics with overflow checking