RecordFlux icon indicating copy to clipboard operation
RecordFlux copied to clipboard

Warning about constant values in checksum specification

Open treiher opened this issue 4 years ago • 0 comments

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.

treiher avatar Aug 03 '21 09:08 treiher