This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ada/41675] GNAT rejects type with 64 bits, claiming it has 65 bits



------- Comment #2 from dirk dot herrmann-privat at gmx dot de  2009-12-05 11:25 -------
Hello,

thanks for considering the bug.

I checked that the maximum value that could be stored in scalars of type T
would be 0xFF80000000000000.  Thus, a representation within 64 bits is
possible.

I have also taken a look at the AARM, where in section 13.3 "Operational and
Representation Attributes"
(http://www.adaic.com/standards/1zaarm/html/AA-13-3.html) paragraphs 54 and 55
it says:

54 {recommended level of support (Size attribute) [partial]} The recommended
level of support for the Size attribute of subtypes is:

55 * The Size (if not specified) of a static discrete or fixed point subtype
should be the number of bits needed to represent each value belonging to the
subtype using an unbiased representation, leaving space for a sign bit only if
the subtype contains negative values. If such a subtype is a first subtype,
then an implementation should support a specified Size for it that reflects
this representation.

So, it may not be a bug, but as I understand it, it would at least be against
the recommendation from the AARM.

Best regards,
Dirk


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41675


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]