Skip to content
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

ppci-cc: binary operators & | ^ and unary ~ & not supported in initializer constants #100

Open
tstreiff opened this issue Jun 26, 2020 · 0 comments
Labels

Comments

@tstreiff
Copy link
Contributor

#define CONST1 ...
#define CONST2 ...
static int ai[] = { CONST1 | CONST2, CONST1 & 0x0f };

is not supported.
The only supported operations are + - * / << >> and unary -.
Any other operators make the IR generator crash (KeyError)
We need to add the binary or/not/xor, and binary not.

Moreover, some of the supported operators do not work on enum types.

tstreiff added a commit to tstreiff/ppci-mirror that referenced this issue Jul 1, 2020
… supported in initializer constants. Also extend the integer operations to enum types (which are integer types). Does not fix for & (address of)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants