On 10/06/16 16:14, Kyrill Tkachov wrote: > > @@ -1553,7 +1588,7 @@ duplicate_decls (tree newdecl, tree olddecl, bool > > /* Whether or not the builtin can throw exceptions has no > bearing on this declarator. */ > - TREE_NOTHROW (olddecl) = 0; > + TREE_NOTHROW (olddecl) = TREE_NOTHROW (newdecl); > > The comment would need to be updated I think.
Probably, yes. Actually the code did *not* do what the comment said, and effectively set the nothrow attribute to zero, thus the eh handlers were emitted when not needed. And IMHO the new code does now literally do what the comment said. At this point there follow 1000+ lines of code, in the same function that merge olddecl into newdecl and back again. The code is dependent on the types_match variable, and in the end newdecl is free'd an olddecl returned. At some places the code is impossible to understand: Look for the memcpy :-/ I *think* the intention is to merge the attribute from the builtin when the header file is not explicitly giving, some or all attributes, when the parameters match. But when the parameters do not match, the header file changes the builtin's signature, and overrides the builtin attributes more or less with defaults or whatever is in the header file. Bernd.