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
sizeof var_name
In the below program, c2v translates sizeof hello incorrectly.
c2v
sizeof hello
#include <unistd.h> int main() { char hello[] = "Hello, unistd world!\n"; write ( 1, hello, sizeof hello ); return 0; }
I believe that sizeof hello is valid C code. c2v translates it (incorrectly) to sizeofhello.
sizeofhello
The actual (incorrect) output:
[translated] module main fn main() { hello := c'Hello, unistd world!\n' C.write(1, hello, sizeofhello) return }
Changing sizeof hello to sizeof(hello) avoids the problem. But, as I said, I believe that sizeof hello is valid C.
sizeof(hello)
For reference: https://en.cppreference.com/w/c/language/sizeof https://en.cppreference.com/w/cpp/language/sizeof
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
In the below program,
c2v
translatessizeof hello
incorrectly.I believe that
sizeof hello
is valid C code.c2v
translates it (incorrectly) tosizeofhello
.The actual (incorrect) output:
Changing
sizeof hello
tosizeof(hello)
avoids the problem. But, as I said, I believe thatsizeof hello
is valid C.For reference:
https://en.cppreference.com/w/c/language/sizeof
https://en.cppreference.com/w/cpp/language/sizeof
The text was updated successfully, but these errors were encountered: