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]

Adding platform extensions?


How would I go about adding extensions to GCC that would allow me to define
an object or interface as follows:

object
{
	int obj_member = 0;
	int obj_member2 = ObjectMember2GUID;
	int function(int param1, int param2) = ObjectFunctionGUID;
} obj_name = ObjectGUID;

or

iface
{
	int obj_member2 = ObjectMember2GUID;
	int function(int param2, int param2) = ObjectFunctionGUID;
} iface_name = InterfaceGUID;

This is for an operating system I've been writing.  So far I have had two
copies of the source.  The first in C uses macros to define the object and
the VTBL structures.  The second is a script that I have a program that
creates binary tables that my object subsystem recognizes and supports.
Obviously way too much hastle to update multiple files to keep the system in
working order.  It would also be nice if it makes it appear to the
programmer as if interfaces and objects were C++ classes as all functions
take a this parameter and I would like to remove the hastle of typing
in ->vtbl. in every function reference.

Any thoughts on how I can do this where a patch could be compiled with every
new release instead of with a single build of GCC, and also any thoughts of
where i would start working on this (i.e. in the GCC sources) since I am not
too familiar with the source tree.

Thanks, any help would be appreciated!

-Dan Guisinger


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