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
#include <assert.h> struct S { int a; } s1, s2, s3; int main() { // simple struct assignment s1.a = 100; assert(s1.a == 100); s2 = s1; // works assert(s2.a == 100); // combined struct assignment s1.a = 200; assert(s1.a == 200); s3 = s2 = s1; // compiler exception, AssertionError assert(s2.a == 200); assert(s3.a == 200); return 0; }
The compiler raises the following exception:
File "/home/tsf/sandbox/ppci/ppci/lang/c/codegenerator.py", line 1032, in gen_expr assert expr.lvalue AssertionError
Note that if "struct" is replaced by "union", it works.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The compiler raises the following exception:
Note that if "struct" is replaced by "union", it works.
The text was updated successfully, but these errors were encountered: