---
title: 不支持原子类型(atomic type)的类型转换
description: "```"
url: https://www.hikunpeng.com/document/detail/zh/kunpengdevps/compilation/ug-bisheng/kunpengbisheng_06_0037.html
sourcePath: /source/zh/kunpengdevps/compilation/ug-bisheng/kunpengbisheng_06_0037.html
indexId: b23db577261897aab0c6c14a6815b7f9e3785a83f201d398f6cec57dcc8603f674
---
# 不支持原子类型(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中有列出，不包括原子类型。


#### 解决方案

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