Skip to content

Wrong handling of #x in macro #296

@danmar

Description

@danmar

Example code:

#define bar(x) x % 2
#define foo(x) printf(#x "\n")

foo(bar(3));

gcc output:

printf("bar(3)" "\n");

simplecpp output:

printf("3%2" "\n");

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions