As mentioned in a recent post, I changed from a 2015 GNAT on Mac Intel to 2022 compiler on Mac ARM.well in the past, certainly without compiler errors.
I don't know if this is of interest but I am now getting a compiler error that I never got before. It is in the Ada bindings to MPFR https://www.mpfr.org/. The problematic code is in this SVN checkout that I have never laid eyes on but which worked
The error that I am now getting isfor the bindings is the same--my concern here is the new Ada compiler complaint.
mpfr-floats.adb:788:27: error: duplication of choice value: 15 at line 787
Here are lines around the referenced lines from that file. The first line (function...) is numbered 783.
function Generic_Round (X : MPFR_Float) return F
is begin
case F'Base'Digits is
when Float'Digits => return F(mpfr_get_flt(X.Value, default_rounding_mode));
when Long_Float'Digits => return F(mpfr_get_d (X.Value, default_rounding_mode));
when Long_Long_Float'Digits => eturn F(mpfr_get_ld (X.Value, default_rounding_mode));
when others => raise Constraint_Error;
end case;
end Generic_Round;
When I comment out line 788 the error does not appear. I have not used this binding for a long time and have not tested it today so I don't know the effect of this modification. The file is several years old and I don't know if the current code base
Looks like Long_Long_Float has at least same mantissa as
Long_Float. What are the actual values of Long_Float'Digits and Long_Long_Float'Digits?
So the correctness of an Ada program can depend on the processor that it runs on?
So the correctness of an Ada program can depend on the processor that it runs on?
So the correctness of an Ada program can depend on the processor that it runs on?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 379 |
Nodes: | 16 (2 / 14) |
Uptime: | 44:29:02 |
Calls: | 8,141 |
Calls today: | 4 |
Files: | 13,085 |
Messages: | 5,858,054 |