On 10/05/2017 05:28 AM, Bernhard Reutner-Fischer wrote:
On Wed, Oct 04, 2017 at 12:51:18PM -0400, Nathan Sidwell wrote:
+ /* If this is already an alias, remove the alias, because the real + decl takes presidence. */ s/presidence/precedence/ ?
thanks,
+ if (!existed) + ; + else if (DECL_ARTIFICIAL (*slot) && DECL_IGNORED_P (*slot))
Wouldn't simply
...
be more in line with the coding style?
Moving the 'existed' test, but I dislike assignments in the middle of conditionals. I think an earlier version had a non-empty first block, but I failed to clean it up.
Fixing thusly. nathan -- Nathan Sidwell
2017-10-05 Nathan Sidwell <nat...@acm.org> * decl2.c (record_mangling): Fix spello and formatting from previous patch. Index: decl2.c =================================================================== --- decl2.c (revision 253421) +++ decl2.c (working copy) @@ -4377,10 +4377,8 @@ record_mangling (tree decl, bool need_wa tree *slot = &mangled_decls->get_or_insert (id, &existed); /* If this is already an alias, remove the alias, because the real - decl takes presidence. */ - if (!existed) - ; - else if (DECL_ARTIFICIAL (*slot) && DECL_IGNORED_P (*slot)) + decl takes precedence. */ + if (existed && DECL_ARTIFICIAL (*slot) && DECL_IGNORED_P (*slot)) if (symtab_node *n = symtab_node::get (*slot)) if (n->cpp_implicit_alias) {