From: Jakub Jelinek <jakub@redhat.com>
To: Jonathan Wakely <jwakely@redhat.com>
Cc: gcc-patches@gcc.gnu.org, Ed Smith-Rowland <3dw4rd@verizon.net>
Subject: Re: [wwwdocs] Document __has_attribute in /gcc-5/changes.html
Date: Wed, 11 Mar 2015 18:16:00 -0000 [thread overview]
Message-ID: <20150311181450.GO1746@tucnak.redhat.com> (raw)
In-Reply-To: <20150311180911.GB4981@redhat.com>
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 <code>#include</code>
> and the extension <code>#include_next</code> respectively.
> </li>
> + <li>A new built-in function to detect the existence of an attribute,
Can you please instead write built-in function-like macro?
> + <code>__has_attribute</code>, has been added. The equivalent built-in
> + function <code>__has_cpp_attribute</code> was added to C++ to support
> + <a href="http://isocpp.org/std/standing-documents/sd-6-sg10-feature-test-recommendations">
> + Feature-testing recommendations for C++</a>.
> + The function <code>__has_attribute</code> is added to all C-like
> + languages as an extension:
> +<blockquote><pre>
> +int
> +#ifdef __has_attribute
> +# if __has_attribute(__noinline__)
> + __attribute__((__noinline__))
> +# endif
> +#endif
> +foo(int x);
> +</pre></blockquote>
> + 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.
> + </li>
> <li>A new set of built-in functions for arithmetics with overflow checking
> has been added: <code>__builtin_add_overflow</code>,
> <code>__builtin_sub_overflow</code> and <code>__builtin_mul_overflow</code>
Jakub
next prev parent reply other threads:[~2015-03-11 18:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-11 18:09 Jonathan Wakely
2015-03-11 18:16 ` Jakub Jelinek [this message]
2015-03-11 18:42 ` Jonathan Wakely
2015-04-07 8:38 ` Gerald Pfeifer
2015-04-07 8:41 ` Jakub Jelinek
2015-04-07 9:10 ` Jonathan Wakely
2015-04-09 23:28 ` Gerald Pfeifer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150311181450.GO1746@tucnak.redhat.com \
--to=jakub@redhat.com \
--cc=3dw4rd@verizon.net \
--cc=gcc-patches@gcc.gnu.org \
--cc=jwakely@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).