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

Double expanded macros aren't parsed well for delayed invocation #394

Open
Tal500 opened this issue Dec 10, 2024 · 5 comments
Open

Double expanded macros aren't parsed well for delayed invocation #394

Tal500 opened this issue Dec 10, 2024 · 5 comments

Comments

@Tal500
Copy link
Contributor

Tal500 commented Dec 10, 2024

The following code isn't transformed well by simplecpp:

#define FOOBAR(x) x

#define MACRO_COMPOSE(A, B) A ## B

MACRO_COMPOSE(FOO, BAR(1))

gcc -E output:

1

simplecpp output:

FOOBAR ( 1 )
@danmar danmar changed the title Double expanded macros aren't paresed well for delayed invocation Double expanded macros aren't parsed well for delayed invocation Dec 12, 2024
@danmar
Copy link
Owner

danmar commented Dec 12, 2024

@Tal500 Please simplify this issue description. Please just show relevant gcc -E output.

@danmar
Copy link
Owner

danmar commented Dec 12, 2024

I don't know.. this might be related to #397

@Tal500
Copy link
Contributor Author

Tal500 commented Dec 15, 2024

@Tal500 Please simplify this issue description. Please just show relevant gcc -E output.

I updated this issue now to contain simpler reproduction.

@danmar
Copy link
Owner

danmar commented Dec 20, 2024

I updated this issue now to contain simpler reproduction.

Excellent 👍

@Tal500
Copy link
Contributor Author

Tal500 commented Jan 6, 2025

I don't know.. this might be related to #397

I can confirm that the problem remains even though #397 was fixed.

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