Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove misleading overflow warnings for signed integer literals #1270

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AndrzejSawula
Copy link

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