From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,775645c75674947,start X-Google-Attributes: gid103376,public From: bourguet@my-deja.com Subject: pragma on overloaded subprograms Date: 1999/08/12 Message-ID: <7ounsm$7l3$1@nnrp1.deja.com>#1/1 X-Deja-AN: 511860022 X-Http-Proxy: NetCache@sj-netcache: Version DEMO_9T4, 1.0 x30.deja.com:80 (Squid/1.1.22) for client 158.140.3.201 Organization: Deja.com - Share what you know. Learn what you don't. X-Article-Creation-Date: Thu Aug 12 15:06:08 1999 GMT X-MyDeja-Info: XMYDJUIDbourguet Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.05 [en] (X11; I; SunOS 5.5.1 sun4u) Date: 1999-08-12T00:00:00+00:00 List-Id: In the Intermetrics X11 ada binding (yes, I'm currently examining these :-) there are several pairs of function like this (still from memory): function toto(..., p: charp;...) return ...; pragma import (C, toto, "toto"); function toto(..., p: char_array; ...) return ...; pragma inline (toto); with a body for the second toto (the one with char_array); the body just call the first function after having appended a NUL to the array. As I understand the RM, both pragmas are supposed to apply to both functions and we are supposed to use renaming to make this kind of things. So I was wondering if I've misunderstood something in the RM or if the bindings here rely on a bug in gnat. BTW, with gnat 3.11p, removing the body give an error "missing body". When I remove the pragma inline, the error still araise. When I move the import pragma past the second declaration, all compile fine. (And run fine because in my test case the array was a litteral and gnat seems to append a nul to all string litterals). This last behavior was the one I had assumed until I remarked the pragma inline. -- Jean-Marc Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.