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

[C2M] Fail to parse GLIBC bits/wchar.h #21

Closed
edubart opened this issue Dec 9, 2019 · 2 comments
Closed

[C2M] Fail to parse GLIBC bits/wchar.h #21

edubart opened this issue Dec 9, 2019 · 2 comments

Comments

@edubart
Copy link
Contributor

edubart commented Dec 9, 2019

With glibc 2.30 (under ArchLinux), the following fails to parse:

#include <wchar.h>
int main(int argc, char *argv[]){return 0;}

Outputs:

/usr/include/bits/wchar.h:35:8: wrong preprocessor expression
/usr/include/bits/wchar.h:43:8: wrong preprocessor expression

The culprit is this odd line
https://github.com/bminor/glibc/blob/glibc-2.30/bits/wchar.h#L35

PS: I've run into the issue while trying out to run with c2m a game made with SDL2. By commenting the lines in wchar.h I was able to run! So this was the only parsing issue.

@vnmakarov
Copy link
Owner

Support of wide chars is not implemented yet in the C-to-MIR compiler (neither in preprocessor, nor in in the rest of the compiler). But I have plans to implement full C11 standard w/o optional variable arrays, complex numbers and atomic data (although it might be necessary to implement for my purposes: CRuby JIT).

Currently, wide-chars and full x86-64 call ABI (x86-64 call ABI permits to pass structures partially or fully though registers) are big parts not implemented yet.

@edubart
Copy link
Contributor Author

edubart commented Jul 20, 2021

It looks like <wchar.h> can be included with no issues nowadays and this issue was more about the inability to parse code that included it, so I'm closing the issue.

@edubart edubart closed this as completed Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants