---
title: 不支持原子类型(atomic type)的类型转换
description: "```"
url: https://www.hikunpeng.com/document/detail/zh/kunpengdevkithistory/bisheng/hist-bisheng/kunpengbisheng_06_0037_0.html
sourcePath: /source/zh/kunpengdevkithistory/bisheng/hist-bisheng/kunpengbisheng_06_0037_0.html
indexId: e10a0ad46917510c9774ec41dc6a7e884e6d03c04de7b6b12128ab4423a4afde82
---
# 不支持原子类型(atomic type)的类型转换

#### 错误信息

```
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中有列出，不包括原子类型。


#### 解决方案

避免对原子类型使用类型转换。
