This is the mail archive of the gcc@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: RFC: target macro->hook migration idea


On Tuesday, July 22, 2003, at 12:18 PM, DJ Delorie wrote:
you mean interface with "C++ virtual functions" ? :-D ;-)

If the target struct were a C++ class, that would make subtargets a lot easier. But we're getting way ahead of ourselves ;-)

And you can use MI to do defaults of many different flavors, each packages in their own headers.


class ELF {
	virtual int has_section() { return 1; }
};

class ELF64 : public ELF {
...
};

class gas {
};

class Solaris {
};

class MyTarget : public ELF64, Solaris, gas {
};

Hookizing everything will make it simpler to convert everything to C++ later.


Bwaa ha ha... :-)



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