From mboxrd@z Thu Jan 1 00:00:00 1970 Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Upcasting interfaces with CPP convention in GNAT Date: Thu, 2 Nov 2023 15:11:54 +0100 Organization: Adalog Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Thu, 2 Nov 2023 14:11:51 -0000 (UTC) Injection-Info: dont-email.me; posting-host="b2e86e5f858097cd9582e1b007117101"; logging-data="2349369"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/HBGZxKV+p1ELSakFdOYkP" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:aWDIlSVLs361Imyk2Ulr4yo04NE= In-Reply-To: Content-Language: en-US, fr Xref: news.eternal-september.org comp.lang.ada:65827 List-Id: Le 02/11/2023 à 13:20, Kura a écrit : > type IBase is interface; > pragma Convention (C_Plus_Plus, IBase); > type IBase_Ptr is access all IBase'Class; > > type IDerived is interface and IBase; > pragma Convention (C_Plus_Plus, IDerived); > type IDerived_Ptr is access all IDerived'Class; I don't know if this is the cause of your problem, but you should give convention C_Plus_Plus to the pointer types too (IBase_Ptr and IDerived_Ptr). -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX https://www.adalog.fr https://www.adacontrol.fr