Skip to content

Macro expansion difference vs other preprocessors #919

@ehaas

Description

@ehaas

Found this example here: https://marc.info/?l=boost&m=118835769257658&w=2

#define A(m) m( B(f)
#define B(x) A(x)

#define C(x) < x >

A(C) ) *

clang, GCC, MSVC, and tinycc output:

< f( B(f) > *

arocc output:

<  A(f)  > *

The post says that our output is correct; and that "Very very few preprocessors get this completely right". Not sure if this is a bug or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions