p4-spec icon indicating copy to clipboard operation
p4-spec copied to clipboard

Remove misleading overflow warnings for signed integer literals

Open AndrzejSawula opened this issue 1 year ago • 0 comments

I would like to propose removing overflow warnings when signed integer literals of explicitly-declared width are specified using positive values with the most significant bit set, i.e. which will be reinterpreted as negative numbers. This is actually the only way negative integer literals of explicitly-declared width can be specified, as per Section 6.3.3.2.

This proposal is accompanied by respective change to the compiler (p4c PR #4309).

AndrzejSawula avatar Dec 22 '23 11:12 AndrzejSawula