Run a “light” preprocessor for GCC

前端 未结 5 888
误落风尘
误落风尘 2021-02-07 10:37

Is there a way to run the GCC preprocessor, but only for user-defined macros?

I have a few one-liners and some #ifdef, etc. conditionals, and I want to see

5条回答
  •  旧时难觅i
    2021-02-07 11:21

    If you just want macro expansions and skip the #include handling, you can try this repo. It is a fork of the original pcpp. I added a --no-include option to skip the handling of #include directive. All other macros will be processed based on your marco input to pcpp.

提交回复
热议问题