RecordFlux
RecordFlux copied to clipboard
Warning about constant values in checksum specification
Constant values in a checksum specification could indicate errors in the specification and should lead to a warning.
Example
package Checksum_Message is
type A is mod 2 ** 8;
type Message is
message
A : A;
Checksum : Opaque
with Size => 8
if Checksum'Valid_Checksum;
end message with
Checksum => (Checksum => (A'Size));
end Checksum_Message;
A'Size is static and will lead to a constant checksum value.