From mboxrd@z Thu Jan 1 00:00:00 1970 X-Received: by 2002:a0c:f84b:0:b0:671:4350:edfa with SMTP id g11-20020a0cf84b000000b006714350edfamr230330qvo.0.1698937705786; Thu, 02 Nov 2023 08:08:25 -0700 (PDT) X-Received: by 2002:a9d:6b1a:0:b0:6bc:fb26:499e with SMTP id g26-20020a9d6b1a000000b006bcfb26499emr5444727otp.2.1698937705576; Thu, 02 Nov 2023 08:08:25 -0700 (PDT) Path: eternal-september.org!news.eternal-september.org!feeder2.eternal-september.org!eternal-september.org!weretis.net!feeder6.news.weretis.net!1.us.feeder.erje.net!feeder.erje.net!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 2 Nov 2023 08:08:24 -0700 (PDT) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=67.77.21.19; posting-account=ahMziQoAAAAL0iwU2Gxnh6xZxKmkLfTD NNTP-Posting-Host: 67.77.21.19 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <1709521b-d44d-4a2e-8833-cb642e706954n@googlegroups.com> Subject: Re: Upcasting interfaces with CPP convention in GNAT From: Kura Injection-Date: Thu, 02 Nov 2023 15:08:25 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:65828 List-Id: On Thursday, November 2, 2023 at 10:11:55=E2=80=AFAM UTC-4, J-P. Rosen wrot= e: > Le 02/11/2023 =C3=A0 13:20, Kura a =C3=A9crit :=20 > > type IBase is interface;=20 > > pragma Convention (C_Plus_Plus, IBase);=20 > > type IBase_Ptr is access all IBase'Class;=20 > >=20 > > type IDerived is interface and IBase;=20 > > pragma Convention (C_Plus_Plus, IDerived);=20 > > type IDerived_Ptr is access all IDerived'Class; > I don't know if this is the cause of your problem, but you should give=20 > convention C_Plus_Plus to the pointer types too (IBase_Ptr and=20 > IDerived_Ptr).=20 That did not solve my problem, but thank you for the tip.