How to add a builtin function in a GCC plugin?

后端 未结 1 495
鱼传尺愫
鱼传尺愫 2021-02-03 16:59

It is possible for a GCC plugin to add a new builtin function? If so, how to do it properly?

GCC version is 5.3 (or newer). The code is compiled and processed by the plug

相关标签:
1条回答
  • 2021-02-03 17:29

    I'm assuming what you want to do (from your comment and linked post) is insert C code into a function. In that case, I would have thought you wouldn't need to go so far as to write a compiler plugin. Have a look at Boost.Preprocessor, which can do very advanced manipulations of C code using only the preprocessor.

    0 讨论(0)
提交回复
热议问题