From: Nick Ing-Simmons <nick@ing-simmons.net>
To: mark@codesourcery.com
Cc: "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>,
Goodman Joe <joe.goodman@intel.com>,
Nathan Sidwell <nathan@codesourcery.com>,
Joe Buck <Joe.Buck@synopsys.com>, Andreas Jaeger <aj@suse.de>,
Richard Henderson <rth@redhat.com>
Subject: Re: Results from Intel4s C++ ABI Testsuite
Date: Sat, 20 Jul 2002 20:50:00 -0000 [thread overview]
Message-ID: <20020720090501.2922.1@bactrian.ni-s.u-net.com> (raw)
In-Reply-To: <35210000.1026337826@warlock.codesourcery.com> from Mark Mitchell on Wed, 10 Jul 2002 14:50:26 -0700
Mark Mitchell <mark@codesourcery.com> writes:
>> It seems that for true C++ binary compatibility all implementers must
>> agree on the type of size_t. Was this overlooked?
>
>Sort of.
>
>As Richard says, this is pretty much a property of the OS. If "int" and
>"long" are the same, you can interchange the two for binary compatibility
>purposes, but you'll never make your header files work right.
>
>And, of course, since "size_t" is just a typedef we can't mangle it
>specially, even if we wanted to.
>
>It is true that if my OS uses "long" and yours uses "int" -- but they
>are the same in all other ways -- then I can't mix and match C++ shared
>objects from our two systems. I can still mix and match C++ shared
>objects from any one of those systems, even if I used different
>compilers to build them.
It seems to me (as a casual reader who does not use C++ much),
that the fact that "type safe linkage" is encoding the "name" of the
type rather than the "type" is sub-optimal. If what was encoded
was "unsigned integer of 32-bits" then the two size_t-s would match.
The "loss" would be that programs that would work on that platform
- even though coded incorrectly - would link.
But catching long vs int confusion is better done before link time.
--
Nick Ing-Simmons
http://www.ni-s.u-net.com/
next prev parent reply other threads:[~2002-07-20 19:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-06 11:51 Results from Intel´s " Andreas Jaeger
2002-07-06 13:10 ` Graham Stott
2002-07-06 13:28 ` Results from Intel4s " Nathan Sidwell
2002-07-10 13:40 ` Richard Henderson
2002-07-10 14:33 ` Joe Buck
2002-07-10 15:12 ` Gabriel Dos Reis
2002-07-10 21:14 ` Mark Mitchell
2002-07-11 9:56 ` Magnus Fromreide
2002-07-11 13:43 ` Richard Henderson
2002-07-20 20:50 ` Nick Ing-Simmons [this message]
2002-07-20 15:20 ` Richard Henderson
2002-07-22 13:41 ` Joe Buck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020720090501.2922.1@bactrian.ni-s.u-net.com \
--to=nick@ing-simmons.net \
--cc=Joe.Buck@synopsys.com \
--cc=aj@suse.de \
--cc=gcc@gcc.gnu.org \
--cc=joe.goodman@intel.com \
--cc=mark@codesourcery.com \
--cc=nathan@codesourcery.com \
--cc=rth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).