Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

Potential macro expansion ambiguity in the recursion engine #13

Open
hirrolot opened this issue Apr 18, 2021 · 0 comments
Open

Potential macro expansion ambiguity in the recursion engine #13

hirrolot opened this issue Apr 18, 2021 · 0 comments

Comments

@hirrolot
Copy link
Owner

It seems that the recursion engine relies on one ambiguity in the standard (the issue is about C++ but the C preprocessor is essentially the same):

https://github.com/Hirrolot/metalang99/blob/695a9d8dbc3507447ba28d312da229730d20c6fc/include/metalang99/eval/rec.h#L12

Here, ML99_PRIV_REC_NEXT can expand to ML99_PRIV_REC_<level>, which is then invoked by a caller of ML99_PRIV_REC_NEXT, thus resulting in the ML99_PRIV_REC_NEXT token once again.

However, I haven't noticed any problems with various compilers yet as they seem to treat this ambiguity in the same way. Please, let me know if your compiler doesn't work because of it; to make sure, run tests/eval/rec.c.

@hirrolot hirrolot added the bug Something isn't working label Apr 18, 2021
@hirrolot hirrolot removed the bug Something isn't working label Jul 22, 2024
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

1 participant