已合并
【C API】修复预期外的编译告警 #639
guojianyang创建于 3月2日
【C API】修复预期外的编译告警 #639
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 guojianyang 的贡献)3月2日 创建了 pull request,commit 4a629d62
CANN-robot
3月2日 评论:
3月2日 评论:
Thanks for your pull-request.
The full list of commands accepted by me can be found at here。
You can get sig-info at here
PR Approval Progress
✅ Congratulations! All modules have met the lgtm and approve requirements.
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| include/c_api | ✅ wuzhaolin, wuyang_hw (2/2) | ✅ wuzhaolin (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)


3月2日 将zhanghao_0689,yanqingshang,wulinyu,zhuliangying,dengjing_aoe,YeZZzzz1,bluesky901,wqtshg_wt,yangbinhua,gao_dafa,chenyiyuan,xun_zhuge,ookkkkoo1122,bianque,houyuyang,shi_nanxiang,wuyang_hw,ascendhjh,DragonBornHD84,jiangZD,wuzhaolin设为评审人
3月2日 将zhanghao_0689,yanqingshang,wulinyu,zhuliangying,dengjing_aoe,YeZZzzz1,bluesky901,wqtshg_wt,yangbinhua,gao_dafa,chenyiyuan,xun_zhuge,ookkkkoo1122,bianque,houyuyang,shi_nanxiang,wuyang_hw,ascendhjh,DragonBornHD84,jiangZD,wuzhaolin设为评审人
3月2日 将ascendhjh,wuzhaolin设为审查人
guojianyang
3月2日 评论:
3月2日 评论:
compile


CANN-robot
3月2日 评论:
3月2日 评论:
🔵 source code change are detected, tasks labels is removed in this pull request!


3月2日 添加了label:cann-cla/yes
CANN-robot
3月2日 评论:
3月2日 评论:
3月2日 添加了label:ci-pipeline-running
CANN-robot
3月2日 评论:
3月2日 评论:
流水线任务触发成功 [流水线指导]
任务链接 [716ba98ef8c44f99a8ef6c3e1bdd7666]
| 任务名称 | 状态 | 日志 | 下载链接 |
|---|---|---|---|
| Compile_Ascend_X86 | ✅ SUCCESS | >>>>> | >>>>> |
| Compile_Ascend_ARM | ✅ SUCCESS | >>>>> | >>>>> |
| API_Check | ✅ SUCCESS | >>>>> | |
| codecheck | ✅ SUCCESS | >>>>> | |
| SCA | ✅ SUCCESS | >>>>> | |
| anti_virus | ✅ SUCCESS | >>>>> | |
| Check_Pr | ✅ SUCCESS | >>>>> | |
| pre_comment | ✅ SUCCESS | >>>>> | |
| UT_Test_3 | ✅ SUCCESS | ||
| UT_Test_2 | ✅ SUCCESS | ||
| UT_Test_1 | ✅ SUCCESS | ||
| UT_Test | ✅ SUCCESS | ||
| UT_Test_reprot | ✅ SUCCESS |
[2026-03-02 15:26:14] CI执行结束


CANN-robot
3月2日 评论:
3月2日 评论:
问题/功能描述
本次PR为 reg_convert.h 和 reg_vector.h 两个头文件添加了条件编译宏控制逻辑。主要目的是通过预定义宏 ASCENDC_C_API_INCLUDE_COMPILER_INTERNAL_HEADERS,统一管理编译器内部头文件在特定编译环境下的包含行为,以解决潜在的宏定义冲突问题,并确保头文件在不同编译上下文中的正确性与一致性。
修改方案描述
在两个头文件的版权声明后、主头文件守卫前,新增条件编译指令:若目标宏未定义,则定义它并同时定义一个用于后续清理的辅助宏。在文件末尾,主头文件守卫结束后,检查该辅助宏并取消定义上述两个宏。此方案通过“定义-使用-取消定义”的模式,实现了宏定义的局部化,精确控制了其作用域,有效避免了宏污染全局命名空间。


3月2日 修改标题为 “【C API】修复”,原标题为“fix marco_warning”
3月2日 修改标题为 “【C API】修复预期外的编译告警”,原标题为“【C API】修复”
3月2日 修改了pull request 的描述
3月2日 添加了label:api-check-pass
3月2日 删除了label:ci-pipeline-running
3月2日 添加了label:ci-pipeline-passed
3月2日 添加了label:lgtmapproved
CANN-robot
3月2日 评论:
3月2日 评论:
3月2日 合入了pull request
描述
C API修复预期外的编译告警,该bug导致在include asc_simd.h后,存在大量预期外的编译告警。
关联的Issue
关联Issue #188
测试
自验证通过
文档更新
NA
类型标签