From -4485609731029006787
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,ea96cc047f6a22cc
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2001-08-10 16:04:01 PST
Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!colt.net!dispose.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail
From: comeau@panix.com (Greg Comeau)
Newsgroups: comp.std.c++
Subject: Re: extern "C" -- what is the intent?
Date: Fri, 10 Aug 2001 23:03:39 GMT
Organization: Comeau Computing; http://www.comeaucomputing.com
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <9l1mej$3mf$1@panix3.panix.com>
References: <090820010209154805%BobbySchmidt@mac.com> <3B733FA0.EFE7F4D5@wizard.net> <tz7uwdBcjAd7Ewb7@ntlworld.com>
Reply-To: comeau@comeaucomputing.com
X-Trace: mail2news.demon.co.uk 997484625 mail2news:10767 mail2news mail2news.demon.co.uk
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
Lines: 32
Xref: archiver1.google.com comp.std.c++:6935

In article <tz7uwdBcjAd7Ewb7@ntlworld.com>,
Francis Glassborow  <francisG@robinton.demon.co.uk> wrote:
>In article <3B733FA0.EFE7F4D5@wizard.net>, James Russell Kuyper Jr.
><kuyper@wizard.net> writes
>>It works the other way too; a
>>name of a function or object defined in C++ can be used from C code, if
>>the C++ definition declares it with C language linkage.
>
>And (and this is very important) the C compiler has a compaitble calling
>sequence (most C compilers use the same one, but I do know ones that do
>not, for example TopSpeed C - one of the very first compilers to get
>full validation in the UK as ISO compliant) used name mangling to ensure
>type safe linkage (and I believe this is allowed, just not required in
>C)

I think there's two statements being made there.  The first is
whether name mangling is required in C.  I think that the answer,
clearly, is no (although it's allowed, it's not a requirement).
The other is whether type safe linkage is required in C.
Certainly some form is.
-- 
Greg Comeau                 Countdown to "export": December 1, 2001
Comeau C/C++ ONLINE ==>     http://www.comeaucomputing.com/tryitout

Tasty C99/C++ Combo: Dinkumware libs + Comeau Compilers == WOW!!!

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]



