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

The overflow parameter of a macro can't be stringified #2161

Open
wixoaGit opened this issue Jan 8, 2025 · 0 comments
Open

The overflow parameter of a macro can't be stringified #2161

wixoaGit opened this issue Jan 8, 2025 · 0 comments
Labels
bug Something isn't working Compiler Involves the OpenDream compiler

Comments

@wixoaGit
Copy link
Member

wixoaGit commented Jan 8, 2025

The following macro produces an incorrect output:

#define MACRO(code...) world.log << #code;

MACRO(var/i = 5)

It gives you world.log << var/i = 5; when it should give you world.log << @#var/i = 5#

A workaround is defining it as #define MACRO(code) and the relevant code is here.

@wixoaGit wixoaGit added bug Something isn't working Compiler Involves the OpenDream compiler labels Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Compiler Involves the OpenDream compiler
Projects
None yet
Development

No branches or pull requests

1 participant