Skip to content

Remove misleading overflow warnings for signed integer literals#1270

Open
AndrzejSawula wants to merge 1 commit into
p4lang:mainfrom
AndrzejSawula:issue1269-fix-int-overflow-warning
Open

Remove misleading overflow warnings for signed integer literals#1270
AndrzejSawula wants to merge 1 commit into
p4lang:mainfrom
AndrzejSawula:issue1269-fix-int-overflow-warning

Conversation

@AndrzejSawula

Copy link
Copy Markdown

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant