1 2 3 | error: used type '_Atomic(int_fast32_t)' where arithmetic or pointer type is required uint32_t(_Atomic(int_fast32_t))(1) ^ |
Clang拒绝对非标准类型的类型转换,并且目前不支持对原子类型(atomic type)的转换。所支持的类型在clang/include/clang/AST/BuiltinTypes.def中有列出,不包括原子类型。
避免对原子类型使用类型转换。