Date: Sun, 16 Feb 1997 11:17:19 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: bakul@torrentnet.com (Bakul Shah) Cc: terry@lambert.org, current@freebsd.org Subject: Re: G++ calling conventions Message-ID: <199702161817.LAA07611@phaeton.artisoft.com> In-Reply-To: <199702160114.UAA00533@chai.plexuscom.com> from "Bakul Shah" at Feb 15, 97 08:14:33 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> > Does anyone know if gcc and/or g++ support the __stdcall type > > designator? > > Yes (according to info gcc). Thanks; I didn't think to look there; I never load "info" on any of my machines. > > PS: What would be the chances of supporting the "interface" keyword > > as an alias for "struct" in a future release? This can be done > > in a FreeBSD-specific way using the g++ config data files (I think). > > If you think this keyword has value, why don't you suggest it to the > gcc people? Adding it just to freebsd guarantees yet another #ifdef > (if you write portable code using it). Though, IMHO, adding the > `interface' keyword is not likely to make your code any more > readable -- C++ is just too gross. Check out Beta for an example of > a consistent and powerful O-O language. I was thinking more in terms of the definition of "long long" and the size of int, and so on. Isn't this parameterically driven in the gcc configuration files? It was last time I checked... The purpose of the "interface" keyword as an alias for "struct" is to allow the use of "struct" to declare pure virtual abstract base classes (to take advantage of the default "public:" value of "struct" members). The purpose of using a keyword other than "struct" for this is to imply member functions, but to imply no constructor/destructor, and to imply no member data -- only functions. I believe HP STL uses "interface", but #define's it as struct. The problem with this is that the compiler does not enforce type checking for "struct" vs. "interface" in this case. Unfortunately, "typedef struct interface" won't work. 8-|. Regards, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199702161817.LAA07611>