https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119185
Xi Ruoyao <xry111 at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xry111 at gcc dot gnu.org --- Comment #3 from Xi Ruoyao <xry111 at gcc dot gnu.org> --- (In reply to Uroš Platiše from comment #0) > I would like to propose a simple feature for gcc to retrieve base object of > indirect calls: > > object->function( ... ) > > which function() could retrieve the object, as its value should have already > been loaded in one of the regs No, the assumption is incorrect (maybe it happens to be correct for your target but not in general). There are many situations where the pointer to the object isn't materialized at all for this. And even if it's materialized it can be clobbered during the process calling the function. This is not a "simple feature" and at the very least it cannot be implemented in the way you proposed. It'd be a grammar sugar to change the meaning of the -> operator, and I'm almost sure such a patch will be immediately rejected.