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

C23 mode #184

Open
spth opened this issue Feb 15, 2023 · 4 comments
Open

C23 mode #184

spth opened this issue Feb 15, 2023 · 4 comments

Comments

@spth
Copy link

spth commented Feb 15, 2023

AFAIK, wave currently has a C99 mode and various C++ modes. IMO, it would make sense to add a C23 mode (AFAIK some of the new C23 features are already supported in wave anyway, as extensions or as the corresponding C++ features).

@jefftrull
Copy link
Collaborator

Agreed 100%. It's a lot of work keeping up with the standard!

btw I just realized you are the primary SDCC maintainer, who I corresponded with about bitfields :) What do you use Wave for?

@spth
Copy link
Author

spth commented Feb 15, 2023

I don't use it yet. SDCC uses a preprocessor based on the one from GCC. My impression is that GCC keep integrating its preprocessor tighter into the compiler, which makes it harder for us to maintain our fork of their preprocessor. clang has a reputation of the preprocessor being even more integrated than with GCC. A Wave-based preprocessor could be an alternative for SDCC in the long term. Clearly, a preprocessor for SDCC needs to be able to support all the C standards SDCC supports.

@hkaiser
Copy link
Collaborator

hkaiser commented Feb 17, 2023

@spth Could you give us a list of features that you'd like to see implemented? Is it more than the #elifndef, #embed, and #warning directives?

@spth
Copy link
Author

spth commented Feb 18, 2023

There is also #embed (#131).

P.S.: The comma-separated list implementation of #embed would be fine. SDCC targets small devices, so if the performance aspects of #embed matter to a user they are already using arrays bigger than what fits into the target device memory.

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

3 participants