如何避免以下错误:-
error: expected primary-expression before "__attribute__"
代码:
#define A(name) __attribute__(name)
如果我在代码中使用此宏作为 A(name),则会收到错误,因为 expected Primary-expression before "__attribute__"
最佳答案
尝试:
#define A(名称) __attribute__((名称))
由于没有代码,我无法判断您是否正确使用它。
关于c - 错误: expected primary-expression before "__attribute__",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7346761/