Article View: borland.public.cppbuilder.database.ado
Article #6018Re: regression of compilers
From: Relaxin
Date: Mon, 20 Nov 2000 00:42
Date: Mon, 20 Nov 2000 00:42
44 lines
2117 bytes
2117 bytes
Both of these will compile because they are calling different Release
methods.
The pointer reference is calling the Release of the Interface.
The other call to Release is calling the Release method of the
TCOM_Connection class, which then calls the Release of the Interface.
"JJ" <jj@jj> wrote in message news:3a15a6cb_1@dnews...
> Has technology become so complex, that compilers can no longer distinguish
> fundamental concepts of code?
>
> Aside from Borlands typelib imports not working correctly (C++ Builder 5),
> the following is an excerpt showing why a programmer could be left
> clueless...
>
> Note: example requires typelib import of ado 2.x
>
> TCOM_Connection cn = CoConnection::Create();
> cn->Release();
> cn.Release();
>
> Note: compiled using C++Builder 5pro. This example compiles, both can't
be
> correct.
>
> I would think that perhaps this fails on typelib style objects? Because
the
> following is interpreted/compiled correctly:
>
> struct A {
> int B;
> };
>
> A fooA;
> A *fooB = new A;
>
> fooA.B = 0;
> fooA->B = 0; // compiler error=good
> fooB.B = 0; // compiler error=good
> fooB->B = 0;
>
>
>
>
>
Technical Details
Message-ID:
<8v9sdr$epb3@bornews.inprise.com>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!bignews.mediaways.net!newsfeed00.sul.t-online.de!t-online.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newspeer1.nac.net!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mailReferences:
<3a15a6cb_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,215dc36fdcc985c X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2000-11-19 16:50:39 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!bignews.mediaways.net!newsfeed00.sul.t-online.de!t-online.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newspeer1.nac.net!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!bornews.borland.com!not-for-mail From: "Relaxin" <relaxin@yourhouse.com> Newsgroups: borland.public.cppbuilder.database.ado Subject: Re: regression of compilers Date: Sun, 19 Nov 2000 16:42:32 -0800 Organization: Another Netscape Collabra Server User Lines: 46 Message-ID: <8v9sdr$epb3@bornews.inprise.com> References: <3a15a6cb_1@dnews> NNTP-Posting-Host: dhcp115.44.lvcm.com X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400