Author: Samuel TardieuSamuel Tardieu Date: Jun 11, 2008 08:56
Adam> This seems odd to me. Having GNAT select a biased component in
Adam> Christoph's example makes some sense, since a compiler can choose any
Adam> representation it likes. But in Markus' case, he specifically asked
Adam> for a certain representation for the enumeration types---should GNAT
Adam> take it upon itself to change that, and display a warning that doesn't
Adam> make it clear that it's disrespecting his request to have the
Adam> enumeration represented a certain way?
Adam>
Adam> I dunno... maybe this would be acceptable to some, and apparently
Adam> Markus thinks it's OK, but ... it's just not what I would expect ...
Adam> I guess it's a subjective thing.
I would prefer an error indeed, but I can't seem to find a clause in
chapter 13 which says that in records with representation clauses the
representation given for objects when created independently the
enumeration representation clause must be honored.
Anyway, the patch I submitted will probably be evaluated by AdaCore
language lawyers. If an error must be signalled, then the warning will
be transformed into one.
Sam
|