http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44978
janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW Assignee|janus at gcc dot gnu.org |unassigned at gcc dot gnu.org --- Comment #15 from janus at gcc dot gnu.org --- (In reply to Mikael Morin from comment #14) > > However, I don't quite see the point of doing this: Doesn't a void return > > value have basically the same effect as returning true? (i.e. to "keep > > going", whereas returning false means to "back out", since there was a > > problem) > > > The point is: if the return value is not reliable, let's remove it. > > The void is indeed the same as returning true ("keep going"). I think it's > better to "always keep going" rather than "keep going because the function > was already called, even if it returned 'back out' the first time". I don't really see an advantage in "always keep going", except for consistency maybe (if there is a simple way to always back out, I'm all for it, but I don't have the feeling we should invest too much work into this point, since the back-out procedure is anyway not pulled through all the way right now). > > Therefore I don't really see the improvement here. To the contrary: I would > > rather say we should propagate the return values as far as possible (one > > case where it is currently not propagated is resolve_symbol). This alone > > might even get rid of the double errors (if one pulls it through fully), but > > again it does not really help with double resolution in the non-error case, > > so I'd say we still need to rely on sym->resolved. > > > OK, let's use more bool; but then the return value shall be consistent > across multiple calls. > So I would say use two bits for each function: one telling whether the > function was already called on the symbol, and one telling the return value. > There are three functions as far as I know (resolve_symbol, > resolve_fl_derived and resolve_fl_derived0) which makes six bits. > Even if you are concerned about wasted memory, that doesn't consume extra > memory because of fields alignments. But then: Will we need to add more procedures to this scheme at some point? Also, I think giving resolve_symbol a bool return value will be quite a bit of work and may drag along further implications. To my mind, the patch in comment 6 is still the most effective way for solving this PR, and I don't have much time to invest in this over the coming week. So, if you have some better ideas how to tackle it, feel free to take over. I guess I'm out for now ...