Topic: Standards Issues er.. Questions
Author: jbuck@synopsys.com (Joe Buck)
Date: 1995/05/05 Raw View
Phil Hystad <philh@nwrain.com> writes:
>Name mangling is not a problem if all libraries are linked on the
>same platform with code from the same compiler. But, it is a problem
>if your platform is one that often has many different compilers
>available and in use. For example, on platforms such as Windows 3.1,
>OS/1, and Windows NT, there are a variety of different compiler
>vendors such as Microsoft Visual C++, Borland C++, Symantic C++,...
>Considering that Windows 3.1++, OS/2, and Windows NT now accounts for
>about 75 percent of all C++ lines of code (many sources report this
>kind of number) produced in North America, shouldn't the ANSI
>working group pay particular attention to some of the problems?
Microsoft has patented its object layout, so competing compilers cannot
be link-compatible unless they license Microsoft's patent.
Given this, there isn't much that ANSI/ISO can do about it.
--
-- Joe Buck <jbuck@synopsys.com> (not speaking for Synopsys, Inc)
Phone: +1 415 694 1729
Author: scherrey@proteus-tech.com
Date: 1995/05/06 Raw View
In <3oe4ek$7a3@hermes.synopsys.com>, jbuck@synopsys.com (Joe Buck) writes:
>Microsoft has patented its object layout, so competing compilers cannot
>be link-compatible unless they license Microsoft's patent.
FWIW, Microsoft has yet , and doesn't seem to be planning on any time
soom, to provide a real C++ compiler so their layout is a moot point. I understand
that the patent in question deals with a vtable implementation issue but from
everything I've heard about it, it sounds like the way I had previously (since
1989) thought that most compiler vendors implemented their's anyway. Even if
they didn't, it sounds like a thing too obvious to be patentable.
later,
Ben Scherrey
Proteus Technologies, Inc.
Author: matt@dogbert.lbl.gov (Matthew Austern)
Date: 1995/05/02 Raw View
In article <3o41nb$r58@sl1.tacoma.net> Phil Hystad <philh@nwrain.com> writes:
> Considering that Windows 3.1++, OS/2, and Windows NT now accounts for
> about 75 percent of all C++ lines of code (many sources report this
> kind of number) produced in North America, shouldn't the ANSI
> working group pay particular attention to some of the problems?
What you're asking for is a standard object format for the popular
Intel operating systems. This isn't an unreasonable desire, but you
should be aware of what you're asking for---it goes far beyond the
mere issue of name mangling. There are dozens of other issues of
calling conventions, object layout, template resolution, and so on.
(And then in Windows 3.1, and OS/2 1.x, there are also disgusting
issues of memory models and segments.)
The ANSI/ISO committee, which is trying to create a standard for
portable C++ programs, just can't be in the business of defining
object formats for each operating system. That's completely outside
their jurisdiction and their expertise.
Some operating system vendors define standard object formats. That, I
think, is what we should hope for. We should press IBM and Microsoft
to define and publish standard object formats for OS/2 and Windows,
and ask other compiler vendors to adhere to those formats when
practical.
--
Matt Austern matt@physics.berkeley.edu
http://dogbert.lbl.gov/~matt
Author: Phil Hystad <philh@nwrain.com>
Date: 1995/05/02 Raw View
clamage@Eng.Sun.COM (Steve Clamage) wrote:
>
> scherrey@proteus-tech.com writes:
>
>
> > Secondly, can someone address what has been done (if anything) about
> >normalizing some kind of standard for performing name mangling?
>
> Name mangling is not part of the language definition. It is merely a
> popular way to implement function overloading on systems which do not
> allow multiple definitions for the same external name.
>
[some stuff deleted]
>
> Don't forget that C++ programs run on an amazing variety of platforms,
> from telephones to supercomputers. You are not going to come up with
> a single set of conventions which is suitable for all of them.
> --
> Steve Clamage, stephen.clamage@eng.sun.com
Name mangling is not a problem if all libraries are linked on the
same platform with code from the same compiler. But, it is a problem
if your platform is one that often has many different compilers
available and in use. For example, on platforms such as Windows 3.1,
OS/1, and Windows NT, there are a variety of different compiler
vendors such as Microsoft Visual C++, Borland C++, Symantic C++,
and several others. It is not uncommon to use library code where
a mixture of compilers from different vendors was used to produce
such libraries. Without some agreement on name mangling, this is
a rather difficult problem.
Considering that Windows 3.1++, OS/2, and Windows NT now accounts for
about 75 percent of all C++ lines of code (many sources report this
kind of number) produced in North America, shouldn't the ANSI
working group pay particular attention to some of the problems?
phil
Author: ball@cygany.Eng.Sun.COM (Mike Ball)
Date: 1995/04/28 Raw View
In article <3nkft8$as8@keystone.intergate.net> scherrey@proteus-tech.com writes:
>> You may interested in various industry standards such as
>>IBM's SOM, Suns OBI, OMG's CORBA, Microsoft DLLs or OLE standards,
>>etc: the ANSI/ISO C++ committee deliberately will not address
>>these issues directly.
>
> John,
>
> Unfortunately, every one of those systems you describe are implemented
>using old-C bindings, not C++. They're having to deal with the same issues. The
>ANSI/ISO committees definately need to deal with these issues, IMHO.
> later,
>
> Ben Scherrey
> Proteus Technologies, Inc.
I can't speak about Microsoft products, but SOM, CORBA, the OBI (not a
product, by the way) and a variety of other schemes all have C++
bindings. They may also have C bindings, but they do have C++
bindings as well. The OBI is C++ only.
-Mike Ball-
SunSoft Developer Products
Author: scherrey@proteus-tech.com
Date: 1995/04/26 Raw View
In <D7FK9G.6HF@ucc.su.OZ.AU>, maxtal@Physics.usyd.edu.au (John Max Skaller) writes:
>In article <3n9i59$c1p@keystone.intergate.net>,
>> Secondly, can someone address what has been done (if anything) about
>>normalizing some kind of standard for performing name mangling? It seems to me
>>that all this compiler-specific stuff really hurts the re-use of compiled code
>>libraries vs. the flexibility available to plain-Old-C development. The extern "C"
>>stuff don't cut it because I want objects, not simple functions shipped in my libs.
>
> You may interested in various industry standards such as
>IBM's SOM, Suns OBI, OMG's CORBA, Microsoft DLLs or OLE standards,
>etc: the ANSI/ISO C++ committee deliberately will not address
>these issues directly.
John,
Unfortunately, every one of those systems you describe are implemented
using old-C bindings, not C++. They're having to deal with the same issues. The
ANSI/ISO committees definately need to deal with these issues, IMHO.
later,
Ben Scherrey
Proteus Technologies, Inc.
Author: b91926@fsgm01.fnal.gov (David Sachs)
Date: 1995/04/26 Raw View
I know of at least one c++ compiler that does NOT mangle fnuction
names, but rather uses the complete expansion of the argument list.
Author: scherrey@proteus-tech.com
Date: 1995/04/22 Raw View
I'm anxious to get hold of a copy of the draft standard but since I don't
current have one, can someone give me some feedback about some issues?
I recall reading about the possibility of extending the typeinfo structure or
somesuch so that additional, application-specific information can be contained
about classes. Are such extensions (or extensibility rather) part of the standard
and, if so, will they be able to support compiler/platform independent code?
Secondly, can someone address what has been done (if anything) about
normalizing some kind of standard for performing name mangling? It seems to me
that all this compiler-specific stuff really hurts the re-use of compiled code
libraries vs. the flexibility available to plain-Old-C development. The extern "C"
stuff don't cut it because I want objects, not simple functions shipped in my libs.
The last I heard (around 1992) was that it was not a high-priority issue because
compiler vendors couldn't even begin to come to terms on how to go about
agreeing on such a mechanism.
thanx & later,
Ben Scherrey
Proteus Technologies, Inc.
Author: clamage@Eng.Sun.COM (Steve Clamage)
Date: 1995/04/22 Raw View
scherrey@proteus-tech.com writes:
> I'm anxious to get hold of a copy of the draft standard but since I don't
>current have one, can someone give me some feedback about some issues?
In late April, a draft standard will be made available on a public FTP
site. To find out how you can get a copy, and how to submit comments
for consideration by the ANSI C++ Committee X3J16, send email to
c++std-notify@research.att.com
You will be placed on a mailing list, and will be notified automatically
when the draft is available and where to get it, along with instructions
for submitting comments.
The "notify" address serves only to place you on a notification mailing
list. The contents of your email will not be read or saved.
>I recall reading about the possibility of extending the typeinfo structure or
>somesuch so that additional, application-specific information can be contained
>about classes.
The draft standard specifies minimal functionality. Implementations
are free to provide additional functionality. If you mean to extend
the typeinfo structure yourself, you would have to derive a class
and put data into it yourself.
> Secondly, can someone address what has been done (if anything) about
>normalizing some kind of standard for performing name mangling?
Name mangling is not part of the language definition. It is merely a
popular way to implement function overloading on systems which do not
allow multiple definitions for the same external name.
C++ implementations have many degrees of freedom. The difference in
name-mangling is the smallest and least-important difference between
any two implementations.
Many platfrom vendors publish or will publish a C++ ABI (Application
Binary Interface) which describes all the implementation-specific
details, including name mangling. Third-party vendors may then choose
to follow that ABI on that platform for compatibility. The ABI will
also make it easier to interface code in multiple languages.
Don't forget that C++ programs run on an amazing variety of platforms,
from telephones to supercomputers. You are not going to come up with
a single set of conventions which is suitable for all of them.
--
Steve Clamage, stephen.clamage@eng.sun.com
Author: maxtal@Physics.usyd.edu.au (John Max Skaller)
Date: 1995/04/22 Raw View
In article <3n9i59$c1p@keystone.intergate.net>,
<scherrey@proteus-tech.com> wrote:
>I recall reading about the possibility of extending the typeinfo structure or
>somesuch so that additional, application-specific information can be contained
>about classes. Are such extensions (or extensibility rather) part of the standard
>and, if so, will they be able to support compiler/platform independent code?
> Secondly, can someone address what has been done (if anything) about
>normalizing some kind of standard for performing name mangling? It seems to me
>that all this compiler-specific stuff really hurts the re-use of compiled code
>libraries vs. the flexibility available to plain-Old-C development. The extern "C"
>stuff don't cut it because I want objects, not simple functions shipped in my libs.
You may interested in various industry standards such as
IBM's SOM, Suns OBI, OMG's CORBA, Microsoft DLLs or OLE standards,
etc: the ANSI/ISO C++ committee deliberately will not address
these issues directly.
--
JOHN (MAX) SKALLER, INTERNET:maxtal@suphys.physics.su.oz.au
Maxtal Pty Ltd,
81A Glebe Point Rd, GLEBE Mem: SA IT/9/22,SC22/WG21
NSW 2037, AUSTRALIA Phone: 61-2-566-2189