From: "Martin Liška" <mliska@suse.cz>
To: Jason Merrill <jason@redhat.com>
Cc: Joseph Myers <joseph@codesourcery.com>,
gcc-patches List <gcc-patches@gcc.gnu.org>,
Richard Biener <richard.guenther@gmail.com>
Subject: Re: [PATCH v2][RFC] Canonize names of attributes.
Date: Tue, 11 Jul 2017 13:38:00 -0000 [thread overview]
Message-ID: <669c960e-f4a8-eae3-efd2-f8c29477a817@suse.cz> (raw)
In-Reply-To: <CADzB+2=o6Wr1jyhk3P2JNYP92B0W6iLcZdgcb8GK3hdMTSjW4Q@mail.gmail.com>
On 07/03/2017 11:00 PM, Jason Merrill wrote:
> On Mon, Jul 3, 2017 at 5:52 AM, Martin Liška <mliska@suse.cz> wrote:
>> On 06/30/2017 09:34 PM, Jason Merrill wrote:
>>> On Fri, Jun 30, 2017 at 5:23 AM, Martin Liška <mliska@suse.cz> wrote:
>>>> This is v2 of the patch, where just names of attributes are canonicalized.
>>>> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
>>>
>>> What is the purpose of the new "strict" parameter to cmp_attribs* ? I
>>> don't see any discussion of it.
>>
>> It's needed for arguments of attribute names, like:
>>
>> /usr/include/stdio.h:391:62: internal compiler error: in cmp_attribs, at tree.h:5523
>> __THROWNL __attribute__ ((__format__ (__printf__, 3, 4)));
>>
>
> Mm. Although we don't want to automatically canonicalize all
> identifier arguments to attributes in the parser, we could still do it
> for specific attributes, e.g. in handle_format_attribute or
> handle_mode_attribute.
Yep, that was done in my previous version of the patch (https://gcc.gnu.org/ml/gcc-patches/2017-06/msg00996.html).
Where only attribute that was preserved unchanged was 'cleanup':
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index 8f638785e0e..08b4db5e5bd 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -24765,7 +24765,8 @@ cp_parser_gnu_attribute_list (cp_parser* parser)
tree tv;
if (arguments != NULL_TREE
&& ((tv = TREE_VALUE (arguments)) != NULL_TREE)
- && TREE_CODE (tv) == IDENTIFIER_NODE)
+ && TREE_CODE (tv) == IDENTIFIER_NODE
+ && !id_equal (TREE_PURPOSE (attribute), "cleanup"))
TREE_VALUE (arguments) = canonize_attr_name (tv);
release_tree_vector (vec);
}
Does it work for you to do it so?
Martin
>
> Jason
>
next prev parent reply other threads:[~2017-07-11 13:38 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-13 12:32 [PATCH][RFC] " Martin Liška
2017-06-13 13:20 ` Richard Biener
2017-06-14 7:48 ` Martin Liška
2017-06-14 9:07 ` Richard Biener
2017-06-14 11:03 ` Martin Liška
2017-06-14 11:19 ` Richard Biener
2017-06-14 16:40 ` Joseph Myers
2017-06-28 14:45 ` Martin Liška
2017-06-14 17:24 ` Jason Merrill
2017-06-16 0:07 ` Martin Sebor
2017-06-28 14:46 ` Martin Liška
2017-06-28 16:06 ` Joseph Myers
2017-06-28 19:01 ` Jason Merrill
2017-06-30 9:23 ` [PATCH v2][RFC] " Martin Liška
2017-06-30 19:35 ` Jason Merrill
2017-07-03 9:52 ` Martin Liška
2017-07-03 21:00 ` Jason Merrill
2017-07-11 13:38 ` Martin Liška [this message]
2017-07-11 15:52 ` Jason Merrill
2017-07-13 13:48 ` Martin Liška
2017-07-13 13:51 ` [RFC][PATCH] Do refactoring of attribute functions and move them to attribs.[hc] Martin Liška
2017-07-14 7:23 ` Jeff Law
2017-07-14 7:40 ` Martin Liška
2017-08-04 13:53 ` Martin Liška
2017-08-08 4:37 ` Martin Liška
2017-08-08 9:14 ` Tom de Vries
2017-09-12 7:55 ` Jakub Jelinek
2017-09-12 11:31 ` Martin Liška
2017-09-12 11:40 ` Jakub Jelinek
2017-09-12 14:25 ` Martin Liška
2017-07-27 12:57 ` [PATCH v2][RFC] Canonize names of attributes Martin Liška
2017-08-02 11:25 ` Joseph Myers
2017-08-04 13:43 ` Martin Liška
2017-08-04 16:54 ` Jason Merrill
2017-08-07 16:44 ` [PATCH][OBVIOUS] Fix missing include of header file in mips.c Martin Liška
2017-08-07 17:10 ` [PATCH][OBVIOUS] Add missing header file attribs.h to couple of targets Martin Liška
2017-08-02 19:42 ` [PATCH v2][RFC] Canonize names of attributes Jason Merrill
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=669c960e-f4a8-eae3-efd2-f8c29477a817@suse.cz \
--to=mliska@suse.cz \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@redhat.com \
--cc=joseph@codesourcery.com \
--cc=richard.guenther@gmail.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).