comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: pragma import ambiguity
Date: Thu, 7 Sep 2006 09:53:16 +0200
Date: 2006-09-07T09:53:16+02:00	[thread overview]
Message-ID: <u8t2cnzrcddn.1hrn7fnv7cm95.dlg@40tude.net> (raw)
In-Reply-To: JGDLg.2382$O5.1258@llslave.llan.ll.mit.edu

On Wed, 06 Sep 2006 13:34:27 -0400, Frank J. Lhota wrote:

> tmoran@acm.org wrote:
>> One Ada compiler accepts this, another doesn't. I agree with the one that
>> objects.  Are we wrong?
>> procedure testimp is
>>   type logicopenm is ( clear, gl_and);
>>   procedure clear(mask:integer);
>>   pragma import(stdcall,clear,"glclear");
>> begin
>>   null;
>> end testimp;
> 
> Of course, one may argue that B.1 should not apply to enumeration 
> literals, but even so, this kind of overloading is not recommended. My 
> advice would be to give the enumeration literal and the procedure 
> separate names.

procedure Testimp is
  procedure Clear (mask:integer);
  pragma Import (stdcall, clear, "glclear");

  type logicopenm is (clear, gl_and);
begin
   null;
end Testimp;

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  parent reply	other threads:[~2006-09-07  7:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-06 16:05 pragma import ambiguity tmoran
2006-09-06 16:39 ` bubble
2006-09-06 16:42   ` bubble
2006-09-06 17:47   ` Pascal Obry
2006-09-21  1:26   ` Dave Thompson
2006-09-06 17:34 ` Frank J. Lhota
2006-09-06 18:06   ` Gautier
2006-09-07  7:53   ` Dmitry A. Kazakov [this message]
2006-09-07 19:35   ` Adam Beneschan
2006-09-08  3:48     ` Randy Brukardt
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox