Skip to content

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

@MarekKnapek

Description

@MarekKnapek

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions