comp.lang.ada
 help / color / mirror / Atom feed
* Calling all language lawyers....
@ 2001-06-06 13:49 Wes Groleau
  2001-06-06 15:52 ` Jeffrey Carter
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Wes Groleau @ 2001-06-06 13:49 UTC (permalink / raw)


Is there anything anywhere that prohibits using a subtype
in pragma Convention?  I've dug around in Annex B in the
RM & AARM and found no such language.  (Nor did I find any
requiring it to be supported.)

I'm porting some code that did this to a compiler
that doesn't allow it.

-- 
Wes Groleau
http://freepages.rootsweb.com/~wgroleau



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Calling all language lawyers....
  2001-06-06 13:49 Calling all language lawyers Wes Groleau
@ 2001-06-06 15:52 ` Jeffrey Carter
  2001-06-06 16:10 ` Tucker Taft
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Jeffrey Carter @ 2001-06-06 15:52 UTC (permalink / raw)


Wes Groleau wrote:
> 
> Is there anything anywhere that prohibits using a subtype
> in pragma Convention?  I've dug around in Annex B in the
> RM & AARM and found no such language.  (Nor did I find any
> requiring it to be supported.)

I am not a language lawyer, nor do I play one on TV.

Since all types in Ada are anonymous, only subtype names may be used for
the Entity parameter of pragma Convention. However, the notes say
"Implementations may place restrictions on interfacing pragmas ...", so
an implementation may restrict the Entity parameter to be the
first-named subtype of a type.

-- 
Jeffrey Carter



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Calling all language lawyers....
  2001-06-06 13:49 Calling all language lawyers Wes Groleau
  2001-06-06 15:52 ` Jeffrey Carter
@ 2001-06-06 16:10 ` Tucker Taft
  2001-06-06 17:20 ` Adam Beneschan
  2001-06-11 21:29 ` Wes Groleau
  3 siblings, 0 replies; 5+ messages in thread
From: Tucker Taft @ 2001-06-06 16:10 UTC (permalink / raw)


Wes Groleau wrote:
> 
> Is there anything anywhere that prohibits using a subtype
> in pragma Convention?  I've dug around in Annex B in the
> RM & AARM and found no such language.  (Nor did I find any
> requiring it to be supported.)
> 
> I'm porting some code that did this to a compiler
> that doesn't allow it.

Pragma convention defines a type-related convention
(all subtypes of a type have the same convention), so
it only makes sense to apply it to a first subtype.

The proof that pragma convention is type-related is
based on the statement in RM95 13.1(8) which
says only Size and Alignment clauses specify subtype-specific
representation aspects.  All other representation items
identifying subtypes are specifying type-related representation
aspects.  Pragma convention specifies the "convention"
aspect of representation (RM95 B.1(28)).
> 
> --
> Wes Groleau
> http://freepages.rootsweb.com/~wgroleau

-- 
-Tucker Taft   stt@avercom.net   http://www.avercom.net
Chief Technology Officer, AverCom Corporation (A Titan Company) 
Burlington, MA  USA (AverCom was formerly the Commercial Division of AverStar:
http://www.averstar.com/~stt)



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Calling all language lawyers....
  2001-06-06 13:49 Calling all language lawyers Wes Groleau
  2001-06-06 15:52 ` Jeffrey Carter
  2001-06-06 16:10 ` Tucker Taft
@ 2001-06-06 17:20 ` Adam Beneschan
  2001-06-11 21:29 ` Wes Groleau
  3 siblings, 0 replies; 5+ messages in thread
From: Adam Beneschan @ 2001-06-06 17:20 UTC (permalink / raw)


Wes Groleau <wwgrol@ftw.rsc.raytheon.com> wrote in message news:<3B1E34E1.70D8BD0@ftw.rsc.raytheon.com>...
> Is there anything anywhere that prohibits using a subtype
> in pragma Convention?  I've dug around in Annex B in the
> RM & AARM and found no such language.  (Nor did I find any
> requiring it to be supported.)
> 
> I'm porting some code that did this to a compiler
> that doesn't allow it.

B.1(28) says that the Convention pragma is a representation pragma.  13.1(1) 
says that representation pragmas are one kind of _representation item_.  
13.1(8) says that representation items are either "subtype-specific" or 
"type-related", with all representation items other than Size and Alignment
clauses being type-related.  The same paragraph says that the name in 
a type-related representation pragma must denote a first subtype.

So I think using a subtype (other than the first subtype) in the Convention
pragma is indeed prohibited by the language.

				-- Adam



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Calling all language lawyers....
  2001-06-06 13:49 Calling all language lawyers Wes Groleau
                   ` (2 preceding siblings ...)
  2001-06-06 17:20 ` Adam Beneschan
@ 2001-06-11 21:29 ` Wes Groleau
  3 siblings, 0 replies; 5+ messages in thread
From: Wes Groleau @ 2001-06-11 21:29 UTC (permalink / raw)


Wes Groleau wrote:
> Is there anything anywhere that prohibits using a subtype
> in pragma Convention?  I've dug around in Annex B in the
> RM & AARM and found no such language.  (Nor did I find any
> requiring it to be supported.)

Thanks, all.  That makes it clear that the accepting compiler
is wrong.

-- 
Wes Groleau
http://freepages.rootsweb.com/~wgroleau



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-06-11 21:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-06 13:49 Calling all language lawyers Wes Groleau
2001-06-06 15:52 ` Jeffrey Carter
2001-06-06 16:10 ` Tucker Taft
2001-06-06 17:20 ` Adam Beneschan
2001-06-11 21:29 ` Wes Groleau

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