You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests/bug1.c:3:19: warning -- assigning pointer without cast to integer
����U
It is expected as in GCC/Clang to print test, but it prints random data, because looks like it's wrongly assigning a pointer instead of initializing the struct.
PS: I was trying this project, mainly because I'm working in other language that already compiles to C, and I found this project promising as it's minimal and can compile C very fast. During my tests I found this issue.
The text was updated successfully, but these errors were encountered:
Thank you for reporting this. I reproduced the problem. It looks c2m is trying to assign pointer to the string to the first element of the data. That is why this warning.
I'll work on it and probably the fix will be available on the next week. Unfortunately, C2M code for initialization in C is very complicated despite I already rewrote the code once.
The following:
Outputs:
It is expected as in GCC/Clang to print
test
, but it prints random data, because looks like it's wrongly assigning a pointer instead of initializing the struct.PS: I was trying this project, mainly because I'm working in other language that already compiles to C, and I found this project promising as it's minimal and can compile C very fast. During my tests I found this issue.
The text was updated successfully, but these errors were encountered: