From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 65799 invoked by alias); 7 Apr 2015 08:38:18 -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 65786 invoked by uid 89); 7 Apr 2015 08:38:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 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; Tue, 07 Apr 2015 08:38:16 +0000 Received: from [192.168.0.133] (vie-91-186-144-236.dsl.sil.at [91.186.144.236]) by ainaz.pair.com (Postfix) with ESMTPSA id D0E6E3F419; Tue, 7 Apr 2015 04:38:11 -0400 (EDT) Date: Tue, 07 Apr 2015 08:38:00 -0000 From: Gerald Pfeifer To: Jonathan Wakely cc: Jakub Jelinek , 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: <20150311184201.GC4981@redhat.com> Message-ID: References: <20150311180911.GB4981@redhat.com> <20150311181450.GO1746@tucnak.redhat.com> <20150311184201.GC4981@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; CHARSET=US-ASCII; FORMAT=flowed Content-Disposition: INLINE X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00217.txt.bz2 Hi Jonathan, On Wed, 11 Mar 2015, Jonathan Wakely wrote: > Yep, revised patch attached. reading this update, there are some changes I'd like to suggest. Some (or all ;-) may be disagreeable; they all stem from me trying to understand this update. One question: where it refers to __has_attribute returning a date in some cases, would it make sense to provide an example or show the format? By the way, gcc/doc/ does not seem to contain any documentation of this macro? Shouldn't that be described there? Gerald Index: gcc-5/changes.html =================================================================== RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-5/changes.html,v retrieving revision 1.94 diff -u -r1.94 changes.html --- gcc-5/changes.html 6 Apr 2015 12:56:40 -0000 1.94 +++ gcc-5/changes.html 7 Apr 2015 08:33:27 -0000 @@ -253,7 +253,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 @@ -270,11 +270,11 @@ #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. + The has_attribute macro 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