This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Push GENERIC farther into C/C++ front ends.


Richard Henderson wrote:

On Wed, Jun 16, 2004 at 08:27:21AM -0700, Mark Mitchell wrote:

You've not really made things much worse -- CLEANUP_STMT was not what I'd want for unlowered C+++ -- but your FOR_INIT_STMT change is a backwards step.


Well, the later is more or less directly caused by the former, so
if anyone cares to reorganize how we approach cleanups, changing
FOR_INIT_STMT back to something meaningful will be trivial.

What *should* happen is that FOR_INIT_STMT (in the case where it declares a new variable) would be a DECL, together with explicit information about how that DECL is (a) initialized -- such as a CALL_EXPR giving the constructor to call and the parameters to use -- and (b) finalized -- such as a CALL_EXPR giving the destructor to call.


Then, during lowering (a phase we don't have yet), we'd convert it into GENERIC.

To be clear, I'm not asking you to undo your change; we're not close enough to the ideal here to make it worthwhile.

--
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]