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

Preprocessor: Macro expansion halted early #605

Closed
ehaas opened this issue Dec 18, 2023 · 1 comment
Closed

Preprocessor: Macro expansion halted early #605

ehaas opened this issue Dec 18, 2023 · 1 comment

Comments

@ehaas
Copy link
Collaborator

ehaas commented Dec 18, 2023

I'm not entirely sure what's going on with this one - I think possibly expanded __VA_ARGS__ should have their hidesets cleared?

GCC and clang produce F_HOOK ()(XXX); arocc produces F_PROGRESS(XX). Expanding that one more time results in the GCC/clang output.

#define F(acc)          F_PROGRESS(acc)
#define F_PROGRESS(acc) CONTINUE(F)(acc##X)
#define F_HOOK()        F
#define UNROLL(...)     __VA_ARGS__
#define DEFER(op)       op EMPTY
#define EMPTY
#define CONTINUE(k)     DEFER(k##_HOOK)()

UNROLL(F_PROGRESS(X))
@ehaas
Copy link
Collaborator Author

ehaas commented Jul 6, 2024

Fixed in 148b1d4

@ehaas ehaas closed this as completed Jul 6, 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