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

error: found trailing tokens after preprocessor expression in legit code. #7

Open
MarekKnapek opened this issue Jun 21, 2024 · 1 comment

Comments

@MarekKnapek
Copy link

Steps to reproduce.

  • git clone https://github.com/PhilippRados/wrecc.git
  • cd wrecc
  • cargo b
  • ./target/debug/wrecc test.c

test.c

#define mytest(a, b) 0

int main(void)
{
#if mytest(1, 2)
        return 1;
#else
        return 2;
#endif
}

Actual result:

error: found trailing tokens after preprocessor expression
|  --> in test.c:5:5
|
5 #if mytest(1, 2)
|     ^
1 error generated.

Expected result:

  • No error message.
@PhilippRados
Copy link
Owner

Yes that's probably because of the currently unsupported function-like macros. I will focus on the preprocessor again after this next release.

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