From owner-freebsd-current  Sun Feb 16 10:19:01 1997
Return-Path: <owner-current>
Received: (from root@localhost)
          by freefall.freebsd.org (8.8.5/8.8.5) id KAA17058
          for current-outgoing; Sun, 16 Feb 1997 10:19:01 -0800 (PST)
Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.50])
          by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id KAA17053
          for <current@freebsd.org>; Sun, 16 Feb 1997 10:18:58 -0800 (PST)
Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id LAA07611; Sun, 16 Feb 1997 11:17:20 -0700
From: Terry Lambert <terry@lambert.org>
Message-Id: <199702161817.LAA07611@phaeton.artisoft.com>
Subject: Re: G++ calling conventions
To: bakul@torrentnet.com (Bakul Shah)
Date: Sun, 16 Feb 1997 11:17:19 -0700 (MST)
Cc: terry@lambert.org, current@freebsd.org
In-Reply-To: <199702160114.UAA00533@chai.plexuscom.com> from "Bakul Shah" at Feb 15, 97 08:14:33 pm
X-Mailer: ELM [version 2.4 PL24]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Sender: owner-current@freebsd.org
X-Loop: FreeBSD.org
Precedence: bulk

> > 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.