p4-spec
p4-spec copied to clipboard
Remove misleading overflow warnings for signed integer literals
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).