From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37651 invoked by alias); 11 Mar 2015 18:16:23 -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 37628 invoked by uid 89); 11 Mar 2015 18:16:20 -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-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; Wed, 11 Mar 2015 18:16:19 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t2BIGHoq000748 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 11 Mar 2015 14:16:18 -0400 Received: from tucnak.zalov.cz (ovpn-116-28.ams2.redhat.com [10.36.116.28]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2BIEx2h002619 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Wed, 11 Mar 2015 14:15:01 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.14.9/8.14.9) with ESMTP id t2BIEqAj032038; Wed, 11 Mar 2015 19:14:53 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.14.9/8.14.9/Submit) id t2BIEoKa032037; Wed, 11 Mar 2015 19:14:50 +0100 Date: Wed, 11 Mar 2015 18:16:00 -0000 From: Jakub Jelinek To: 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 Message-ID: <20150311181450.GO1746@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20150311180911.GB4981@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150311180911.GB4981@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00643.txt.bz2 On Wed, Mar 11, 2015 at 06:09:11PM +0000, Jonathan Wakely wrote: > This is a slightly-modified version of Ed's patch from > https://gcc.gnu.org/ml/gcc-patches/2015-01/msg02357.html which I plan > to commit to CVS tomorrow. > > Index: changes.html > =================================================================== > RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-5/changes.html,v > retrieving revision 1.88 > diff -u -r1.88 changes.html > --- changes.html 10 Mar 2015 17:34:36 -0000 1.88 > +++ changes.html 11 Mar 2015 18:06:52 -0000 > @@ -189,6 +189,29 @@ > of the standard directive #include > and the extension #include_next respectively. > > +
  • A new built-in function to detect the existence of an attribute, Can you please instead write built-in function-like macro? > + __has_attribute, has been added. The equivalent built-in > + function __has_cpp_attribute was added to C++ to support > + > + Feature-testing recommendations for C++. > + The function __has_attribute is added to all C-like > + languages as an extension: > +
    > +int
    > +#ifdef __has_attribute
    > +#  if __has_attribute(__noinline__)
    > +  __attribute__((__noinline__))
    > +#  endif
    > +#endif
    > +foo(int x);
    > +
    > + 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. > + For C++11 and onwards the attribute may be scoped. > +
  • >
  • A new set of built-in functions for arithmetics with overflow checking > has been added: __builtin_add_overflow, > __builtin_sub_overflow and __builtin_mul_overflow Jakub