On 06/30/2017 09:34 PM, Jason Merrill wrote:
> On Fri, Jun 30, 2017 at 5:23 AM, Martin Liška <mli...@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)));

there we need strict to be set to false:

x8a64e7 cmp_attribs
        ../../gcc/tree.h:5523
0x8a64e7 cmp_attribs
        ../../gcc/tree.h:5536
0x8a64e7 convert_format_name_to_system_name
        ../../gcc/c-family/c-format.c:3966
0x8a6e5c convert_format_name_to_system_name
        ../../gcc/c-family/c-format.c:338
0x8a6e5c decode_format_attr
        ../../gcc/c-family/c-format.c:299
0x8aa380 handle_format_attribute(tree_node**, tree_node*, tree_node*, int, 
bool*)
        ../../gcc/c-family/c-format.c:4005
0x869d07 decl_attributes(tree_node**, tree_node*, int)
        ../../gcc/attribs.c:548
0x6c0ee3 cplus_decl_attributes(tree_node**, tree_node*, int)
        ../../gcc/cp/decl2.c:1407
...

I think it's useful to have name comparison in a single function.

Martin

> 
> Jason
> 

Reply via email to