We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Related to #253. I noticed that in c_parser.py at L1882, it ignores type suffixes on hexadecimal floating point literals.
This commit explicitly ignoring hexadecimal literals, and this commit added an incorrect test.
float* a = { 0.1f, 0.1, 0.1l, 0x1p0f, 0x1p0, 0x1p0l };
FileAST: Decl: a, [], [], [], [] PtrDecl: [] TypeDecl: a, [], None IdentifierType: ['float'] InitList: Constant: float, 0.1f Constant: double, 0.1 Constant: long double, 0.1l Constant: float, 0x1p0f Constant: float, 0x1p0 Constant: float, 0x1p0l
The type of the hexadecimal constants should be "float", "double" and "long double" in that order. Test cases should be amended.
type
I ran a little test with my compiler to verify the sizes of the literals.
#include <stdio.h> int main(void) { printf("%llu %llu %llu\n%llu %llu %llu", sizeof(0.1f), sizeof(0.1), sizeof(0.1l), sizeof(0x1p0f), sizeof(0x1p0), sizeof(0x1p0l)); return 0; }
4 8 16 4 8 16
The text was updated successfully, but these errors were encountered:
Thank you for the report. Please feel free to submit a PR with a fix
Sorry, something went wrong.
No branches or pull requests
Related to #253. I noticed that in c_parser.py at L1882, it ignores type suffixes on hexadecimal floating point literals.
This commit explicitly ignoring hexadecimal literals, and this commit added an incorrect test.
The
type
of the hexadecimal constants should be "float", "double" and "long double" in that order. Test cases should be amended.I ran a little test with my compiler to verify the sizes of the literals.
The text was updated successfully, but these errors were encountered: