-
Notifications
You must be signed in to change notification settings - Fork 508
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
The rust compiler is permissive of f32 and f64 suffix #922
Conversation
Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
Thanks for the PR! I think this is already covered in the floating point grammar:
Is there any particular reason to mention this as part of the integer grammar? |
The floating point grammar, as quoted by ehuss, is defined at https://doc.rust-lang.org/stable/reference/tokens.html#floating-point-literals The changes in this PR are factually incorrect, but there is at least one change that can be made: Adding |
Apologies if this is not the correct place to add this. When testing gccrs vs rust it was noticed that f32 and f64 suffix was allowed on integers abut the integer token spec didn't mention thus our lexer enforced that f32 and f64 was an invalid suffix for this integer token. Maybe just adding f32 and f64 is enough to the list of accepted suffix types is enough for this change. |
|
This seems to me to me the only actionable thing to the confusion in pr rust-lang#922. Also, move a link ref down to the rest of the link refs.
Since this PR is factually incorrect due to a misunderstanding of how to read the grammar, I am closing it. Nonetheless, thanks for the attempt to help. |
This seems to me to me the only actionable thing to the confusion in pr rust-lang#922. Also, move a link ref down to the rest of the link refs.
During development of gccrs it was found in PR Rust-GCC/gccrs#126 that the rust compiler is permissive of the float suffix on literals but the spec does not show this.