comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Enumeration representation clause surprise.
Date: Wed, 11 Jun 2008 20:16:54 -0500
Date: 2008-06-11T20:16:54-05:00	[thread overview]
Message-ID: <88GdnYlGypeb5M3VnZ2dnUVZ_hzinZ2d@comcast.com> (raw)
In-Reply-To: 48502e38$0$23821$4f793bc4@news.tdc.fi

>There's a "Note" in RM13.4(11/1) that says "Unchecked_Conversion
>may be used to query the internal codes used for an enumeration type".
   That, along with 13.4(7) "An enumeration representation clause
specifies the coding aspect of representation.  The coding consists of the
internal code for each enumeration literal, ..."  sure sounds to me like
an Unchecked_Conversion should return the internal code set by the
enumeration representation clause, ie, the number 1 or number 2 in this
case.  The fact the variable in question is in a record shouldn't make
that false.
  RM 13.1(1) says about representation items (a superset of representation
clauses) that "They can be provided to ...  or to interface with features
that are outside the domain of the language (for example, peripheral
hardware)."  In this case that clearly would not work.  And if the
compiler is going to ignore something the programmer asked for, it ought
to at least generate a warning.



  reply	other threads:[~2008-06-12  1:16 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-11 11:38 Enumeration representation clause surprise Markus Schoepflin
2008-06-11 12:30 ` christoph.grein
2008-06-11 12:56   ` Markus Schoepflin
2008-06-11 13:08     ` christoph.grein
2008-06-11 13:28     ` Samuel Tardieu
2008-06-11 13:48       ` Markus Schoepflin
2008-06-11 13:56         ` Samuel Tardieu
2008-06-11 14:58       ` Adam Beneschan
2008-06-11 15:23         ` Markus Schoepflin
2008-06-12  2:37           ` Randy Brukardt
2008-06-12  2:37           ` Randy Brukardt
2008-06-11 15:56         ` Samuel Tardieu
2008-06-11 19:10           ` Adam Beneschan
2008-06-11 19:59             ` Niklas Holsti
2008-06-12  1:16               ` tmoran [this message]
2008-06-12  8:27                 ` christoph.grein
2008-06-12  8:45               ` Markus Schoepflin
2008-06-12 16:43                 ` Mike Silva
2008-06-12 18:41                   ` Markus Schöpflin
2008-06-12 20:10                     ` Mike Silva
2008-06-12 20:52                       ` Simon Wright
2008-06-12 23:36                         ` Mike Silva
2008-06-13  5:49                           ` Simon Wright
2008-06-13  7:21                       ` Keith Thompson
2008-06-13 13:31                         ` Mike Silva
2008-06-13 14:45                           ` Markus Schoepflin
2008-06-13 17:52                           ` Keith Thompson
2008-06-13  9:14                       ` Jean-Pierre Rosen
2008-06-12 19:05 ` richtmyer
2008-06-12 21:26   ` Samuel Tardieu
2008-06-12 22:42     ` Adam Beneschan
2008-06-13  7:11       ` Samuel Tardieu
2008-06-13  8:27       ` christoph.grein
2008-06-13 16:21         ` Adam Beneschan
2008-06-15 19:33           ` Robert A Duff
2008-06-16 14:50             ` Adam Beneschan
2008-06-16 19:18               ` Robert A Duff
2008-06-17  6:03               ` christoph.grein
2008-06-17  7:22                 ` christoph.grein
2008-06-13  8:24     ` Peter Hermann
2008-06-13 14:47       ` Samuel Tardieu
2008-06-14 11:48         ` John B. Matthews
replies disabled

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