On 1/7/21 11:47 AM, Jakub Jelinek wrote: > In GCC10 cp_walk_subtrees has been changed to walk template arguments. > As the following testcase, that changed the mangling of some functions. Argh. > I believe the previous behavior that find_abi_tags_r doesn't recurse into > template args has been the correct one, but setting *walk_subtrees = 0 > for the types and handling the types subtree walking manually in > find_abi_tags_r looks too hard, there are a lot of subtrees and details what > should and shouldn't be walked, both in tree.c (walk_type_fields there, > which is static) and in cp_walk_subtrees itself. > > The following patch abuses the fact that *walk_subtrees is an int to > tell cp_walk_subtrees it shouldn't walk the template args. > > Another option would be to have two separate cp_walk_subtrees-like > callbacks, one that wouldn't walk into template args and the other > that would and then would tail call the other one, and > cp_walk_tree_without_duplicates but call walk_tree_1 directly or use > some other macro. I like the idea to use *walk_subtrees to distinguish between walking syntactic subtrees and walking type-identity subtrees. But it should be more general; how does this look to you? Jason