static inline : error: attributes should be specified before the declarator in a function definition

static inline : error: attributes should be specified before the declarator in a function definition

:错误:属性应该在函数定义中声明符之前指定

 

static inline int32_t OverflowingMulS16S32ToS32(int16_t a, int32_t b)

    RTC_NO_SANITIZE("signed-integer-overflow") {

把   RTC_NO_SANITIZE("signed-integer-overflow")   注释掉就可以了

 

或者

static inline int32_t RTC_NO_SANITIZE("signed-integer-overflow")OverflowingMulS16S32ToS32(int16_t a, int32_t b)

 

https://trac.macports.org/ticket/56977

网上说这是gcc8的问题, Bottom line, gcc8 is more pedantic than gcc7 about the position of attributes in function declarations.

 

 


版权声明:本文为sun007700原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。