From: Mark Wilson <markwilson@wilsonnet.technology>
Subject: Re: Odd Behaviour
Date: Tue, 18 Jan 2022 03:51:35 -0800 (PST) [thread overview]
Message-ID: <55bae7e8-f5da-4cfc-b0f9-284bc900d89cn@googlegroups.com> (raw)
In-Reply-To: <ss69e5$p17$1@dont-email.me>
On Tuesday, January 18, 2022 at 11:48:23 AM UTC, Jeffrey R.Carter wrote:
> On 2022-01-18 12:05, Mark Wilson wrote:
> >
> > then an error is raised: 'warning: Valued_Procedure has no effect for convention Ada [enabled by default]'
> The GNAT RM says of pragma Import_Valued_Procedure
>
> "Note that it is important to use this pragma in conjunction with a separate
> pragma Import that specifies the desired convention, since otherwise the default
> convention is Ada, which is almost certainly not what is required."
>
> What happens if you replace the import aspects with pragma Import?
> --
> Jeff Carter
> "Monsieur Arthur King, who has the brain of a duck, you know."
> Monty Python & the Holy Grail
> 09
Tried pragma Import, and even pragma Convention, so, for instance,
procedure SQLAllocHandle
(Result : out SQLRETURN;
HandleType : in SQL_HANDLE_TYPE;
InputHandle : in SQLHANDLE;
OutputHandlePtr : in out SQLHANDLE)
with
Pre => (Handletype = SQL_Handle_Env);
pragma Import (C, SQLAllocHandle, "SQLAllocHandle");
pragma Import_Valued_Procedure (SQLAllocHandle);
Fails with the same warning. Take the 'pre' out and it works fine.
next prev parent reply other threads:[~2022-01-18 11:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-18 11:05 Odd Behaviour Mark Wilson
2022-01-18 11:16 ` Marius Amado-Alves
2022-01-18 11:21 ` Mark Wilson
2022-01-18 11:24 ` Mark Wilson
2022-01-18 11:28 ` Jeffrey R.Carter
2022-01-18 11:35 ` Mark Wilson
2022-01-18 11:48 ` Jeffrey R.Carter
2022-01-18 11:51 ` Mark Wilson [this message]
2022-01-18 12:08 ` Mark Wilson
2022-01-18 12:18 ` Mark Wilson
2022-01-18 12:27 ` Mark Wilson
2022-01-18 13:50 ` Mark Wilson
2022-01-18 12:25 ` Jeffrey R.Carter
2022-01-18 12:30 ` Mark Wilson
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox