Joern Rennecke <amyl...@spamcop.net> writes:

> I don't see how going to a struct cumulative_args gets us closer to
> a viable solution for a multi-target executable, even if you threw in
> C++.  Having the target describe a type, and shoe-horning this through
> a target
> hook interface that is decribed in supposedly target-independent terms
> will require a cast at some point - either of the hook argument that
> describes the cumulative args, the hook pointer (not valid C / C++), or
> a pointer to the target vector, or a pointer to some factored-out part of
> the target vector.  Converting an empty base class to a derived class
> is not really safer than converting a void * to a struct pointer.
> And switching to a dynamically typed language is not really on the
> agenda...

In C++ we would use a pure abstract base class in the target hooks and
the targets would have to provide an implementation for the base class.

Ian

Reply via email to