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

Print _BitInt size in diagnostics #700

Open
ehaas opened this issue May 3, 2024 · 0 comments
Open

Print _BitInt size in diagnostics #700

ehaas opened this issue May 3, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ehaas
Copy link
Collaborator

ehaas commented May 3, 2024

_BitInt(10) x = 1.2;

Currently our warning looks like this:

test.c:1:17: warning: implicit conversion from 'double' to '_BitInt' changes value from 1.2 to 1 [-Wfloat-conversion]
_BitInt(10) x = 1.2;
                ^

When it should be

test.c:1:17: warning: implicit conversion from 'double' to '_BitInt(10)' changes value from 1.2 to 1 [-Wfloat-conversion]
_BitInt(10) x = 1.2;
                ^
  1. Change the unsigned_bit_int_too_small, signed_bit_int_too_small, and bit_int_too_big messages to not take a string parameter.
  2. Change Builder.Specifier.str to return null for the _BitInt specifiers
  3. Handle _BitInt types in Type.printPrologue
@ehaas ehaas added enhancement New feature or request good first issue Good for newcomers labels May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant