public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "joseph at codesourcery dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/46859] Attribute depends on location
Date: Thu, 09 Dec 2010 21:24:00 -0000 [thread overview]
Message-ID: <bug-46859-4-GMDtV1qW67@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-46859-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46859
--- Comment #6 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2010-12-09 21:23:53 UTC ---
On Thu, 9 Dec 2010, hjl.tools at gmail dot com wrote:
> For
>
> int *
> __attribute__((aligned(4096)))
> foo2 ()
> {
> return 0;
> }
>
> parser applies attribute to "int *" instead of foo2.
Yes, this is as documented, just like if you had a type qualifier there.
I see that two critical words were missing in the relevant section of the
manual; I've applied this patch to add them.
Index: doc/extend.texi
===================================================================
--- doc/extend.texi (revision 167663)
+++ doc/extend.texi (working copy)
@@ -4036,7 +4036,7 @@
declaration @code{T D} specifies the type
``@var{derived-declarator-type-list} @var{Type}'' for @var{ident}, then
@code{T D1} specifies the type ``@var{derived-declarator-type-list}
-@var{type-qualifier-and-attribute-specifier-list} @var{Type}'' for
+@var{type-qualifier-and-attribute-specifier-list} pointer to @var{Type}'' for
@var{ident}.
For example,
Index: ChangeLog
===================================================================
--- ChangeLog (revision 167663)
+++ ChangeLog (working copy)
@@ -1,5 +1,10 @@
2010-12-09 Joseph Myers <joseph@codesourcery.com>
+ * doc/extend.texi (Attribute Syntax): Correct description of
+ attributes in pointer declarators.
+
+2010-12-09 Joseph Myers <joseph@codesourcery.com>
+
* config/mips/vxworks.h (DBX_REGISTER_NUMBER): Undefine.
* config.gcc (mips64*-*-linux* | mipsisa64*-*-linux*,
mips*-*-linux*, mips-wrs-vxworks): Don't use svr4.h.
next prev parent reply other threads:[~2010-12-09 21:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-09 0:28 [Bug c/46859] New: " hjl.tools at gmail dot com
2010-12-09 15:44 ` [Bug c/46859] " hjl.tools at gmail dot com
2010-12-09 20:31 ` davek at gcc dot gnu.org
2010-12-09 20:45 ` hjl.tools at gmail dot com
2010-12-09 21:06 ` pinskia at gcc dot gnu.org
2010-12-09 21:07 ` pinskia at gcc dot gnu.org
2010-12-09 21:24 ` joseph at codesourcery dot com [this message]
2013-10-21 20:08 ` mpolacek at gcc dot gnu.org
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=bug-46859-4-GMDtV1qW67@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/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).