Talk About Network

Google





Programming > Ada > Re: Enumeration...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 8 of 42 Topic 5748 of 6006
Post > Topic >>

Re: Enumeration representation clause surprise.

by Adam Beneschan <adam@[EMAIL PROTECTED] > Jun 11, 2008 at 07:58 AM

On Jun 11, 6:28 am, Samuel Tardieu <s...@[EMAIL PROTECTED]
> wrote:
> Markus> This is exactly my point. I would have expected a compile time
error
> Markus> for this impossible request.
>
> Markus> Representation clauses are (amongst other) meant to specify
specific
> Markus> binary layouts for interfacing with the external world. Or am I
> Markus> mistaken here?
>
> I can't find anything in RM chapter 13 which either forbids or allows
> such a behaviour. I will submit a patch for GNAT which gives a new
> warning for this case:
>
>     11.       A1 at 0 range 0 .. 0; -- (*)
>                  |
>         >>> warning: component representation will be biased

This seems odd to me.  Having GNAT select a biased component in
Christoph's example makes some sense, since a compiler can choose any
representation it likes.  But in Markus' case, he specifically asked
for a certain representation for the enumeration types---should GNAT
take it upon itself to change that, and display a warning that doesn't
make it clear that it's disrespecting his request to have the
enumeration represented a certain way?

I dunno... maybe this would be acceptable to some, and apparently
Markus thinks it's OK, but ... it's just not what I would expect ...
I guess it's a subjective thing.

                                -- Adam
 




 42 Posts in Topic:
Enumeration representation clause surprise.
Markus Schoepflin <nos  2008-06-11 13:38:17 
Re: Enumeration representation clause surprise.
christoph.grein@[EMAIL PR  2008-06-11 05:30:35 
Re: Enumeration representation clause surprise.
Markus Schoepflin <nos  2008-06-11 14:56:34 
Re: Enumeration representation clause surprise.
Samuel Tardieu <sam@[E  2008-06-11 15:28:36 
Re: Enumeration representation clause surprise.
Markus Schoepflin <nos  2008-06-11 15:48:09 
Re: Enumeration representation clause surprise.
Samuel Tardieu <sam@[E  2008-06-11 15:56:28 
Re: Enumeration representation clause surprise.
christoph.grein@[EMAIL PR  2008-06-11 06:08:06 
Re: Enumeration representation clause surprise.
Adam Beneschan <adam@[  2008-06-11 07:58:44 
Re: Enumeration representation clause surprise.
Markus Schoepflin <nos  2008-06-11 17:23:25 
Re: Enumeration representation clause surprise.
"Randy Brukardt"  2008-06-11 21:37:06 
Re: Enumeration representation clause surprise.
"Randy Brukardt"  2008-06-11 21:37:06 
Re: Enumeration representation clause surprise.
Samuel Tardieu <sam@[E  2008-06-11 17:56:12 
Re: Enumeration representation clause surprise.
Adam Beneschan <adam@[  2008-06-11 12:10:33 
Re: Enumeration representation clause surprise.
Niklas Holsti <niklas.  2008-06-11 22:59:12 
Re: Enumeration representation clause surprise.
tmoran@[EMAIL PROTECTED]   2008-06-11 20:16:54 
Re: Enumeration representation clause surprise.
christoph.grein@[EMAIL PR  2008-06-12 01:27:45 
Re: Enumeration representation clause surprise.
Markus Schoepflin <nos  2008-06-12 10:45:14 
Re: Enumeration representation clause surprise.
Mike Silva <snarflemik  2008-06-12 09:43:45 
Re: Enumeration representation clause surprise.
=?ISO-8859-1?Q?Markus_Sch  2008-06-12 20:41:37 
Re: Enumeration representation clause surprise.
Mike Silva <snarflemik  2008-06-12 13:10:49 
Re: Enumeration representation clause surprise.
Simon Wright <simon.j.  2008-06-12 21:52:56 
Re: Enumeration representation clause surprise.
Keith Thompson <kst-u@  2008-06-13 00:21:08 
Re: Enumeration representation clause surprise.
Jean-Pierre Rosen <ros  2008-06-13 11:14:09 
Re: Enumeration representation clause surprise.
Mike Silva <snarflemik  2008-06-12 16:36:19 
Re: Enumeration representation clause surprise.
Simon Wright <simon.j.  2008-06-13 06:49:09 
Re: Enumeration representation clause surprise.
Mike Silva <snarflemik  2008-06-13 06:31:41 
Re: Enumeration representation clause surprise.
Markus Schoepflin <nos  2008-06-13 16:45:09 
Re: Enumeration representation clause surprise.
Keith Thompson <kst-u@  2008-06-13 10:52:43 
Re: Enumeration representation clause surprise.
richtmyer@[EMAIL PROTECTE  2008-06-12 12:05:05 
Re: Enumeration representation clause surprise.
Samuel Tardieu <sam@[E  2008-06-12 23:26:55 
Re: Enumeration representation clause surprise.
Peter Hermann <ica2ph@  2008-06-13 08:24:25 
Re: Enumeration representation clause surprise.
Samuel Tardieu <sam@[E  2008-06-13 16:47:45 
Re: Enumeration representation clause surprise.
"John B. Matthews&qu  2008-06-14 07:48:33 
Re: Enumeration representation clause surprise.
Adam Beneschan <adam@[  2008-06-12 15:42:29 
Re: Enumeration representation clause surprise.
Samuel Tardieu <sam@[E  2008-06-13 09:11:17 
Re: Enumeration representation clause surprise.
christoph.grein@[EMAIL PR  2008-06-13 01:27:07 
Re: Enumeration representation clause surprise.
Adam Beneschan <adam@[  2008-06-13 09:21:02 
Re: Enumeration representation clause surprise.
Robert A Duff <bobduff  2008-06-15 15:33:03 
Re: Enumeration representation clause surprise.
Adam Beneschan <adam@[  2008-06-16 07:50:19 
Re: Enumeration representation clause surprise.
Robert A Duff <bobduff  2008-06-16 15:18:23 
Re: Enumeration representation clause surprise.
christoph.grein@[EMAIL PR  2008-06-16 23:03:18 
Re: Enumeration representation clause surprise.
christoph.grein@[EMAIL PR  2008-06-17 00:22:33 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Wed Jan 7 14:14:59 PST 2009.