public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/15939] New: Support of 64 bits unsigned ranged integers
@ 2004-06-11 12:42 jc at apinc dot org
2004-06-11 12:48 ` [Bug ada/15939] " charlet at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: jc at apinc dot org @ 2004-06-11 12:42 UTC (permalink / raw)
To: gcc-bugs
A 64 bits unsigned ranged integer type definition won't be accepted by GNAT (on
x86).
This may not be a real bug, but a limitation. In this case requalify this report
as a feature request since I think it could be implemented (and in fact is
implemented but just for modular types, so without range/overflow checking).
The following code demonstrate what I'm saying:
package int64 is
type Unsigned_Modular_64 is mod 2**64;
type Unsigned_Ranged_63 is range 0 .. 16#7FFF_FFFF_FFFF_FFFF#;
type Signed_Ranged_64 is range -(2**63 - 1) .. 2**63 - 1;
-- Following won't be accepted
type Unsigned_Ranged_64 is range 0 .. 16#8000_0000_0000_0000#;
end int64;
Compilation gives:
$ gnatmake int64.ads
gcc-3.4 -c int64.ads
int64.ads:8:31: integer type definition bounds out of range
gnatmake: "int64.ads" compilation error
Cheers,
JC
--
Summary: Support of 64 bits unsigned ranged integers
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jc at apinc dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i486-pc-linux-gnu
GCC host triplet: i486-pc-linux-gnu
GCC target triplet: i486-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15939
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug ada/15939] Support of 64 bits unsigned ranged integers
2004-06-11 12:42 [Bug ada/15939] New: Support of 64 bits unsigned ranged integers jc at apinc dot org
@ 2004-06-11 12:48 ` charlet at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: charlet at gcc dot gnu dot org @ 2004-06-11 12:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From charlet at gcc dot gnu dot org 2004-06-11 12:48 -------
As you said, if you want unsigned 64 bits, you can use modular types.
For range types, extra arithmetic is needed for overflow checks, etc...
and since GCC only support up to 64bits integer, this won't get
implemented.
Arno
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |WONTFIX
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15939
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-06-11 12:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-11 12:42 [Bug ada/15939] New: Support of 64 bits unsigned ranged integers jc at apinc dot org
2004-06-11 12:48 ` [Bug ada/15939] " charlet at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).