gpt4 book ai didi

c++ - 将 OSX Clang 配置为对 include 语句区分大小写

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:02:13 69 4
gpt4 key购买 nike

我知道 C++ include 语句中区分大小写是一个文件系统问题(相关问题 herehere)。

是否可以将 Clang 配置为要求区分大小写的匹配以防止跨平台构建问题?

最佳答案

Clang 现在有这些警告标志:

-Wnonportable-include-path
-Wnonportable-system-include-path

第一个用于引用包含,第二个用于尖括号包含。它们甚至可以映射到错误:

-Werror=nonportable-include-path
-Werror=nonportable-system-include-path

据推测,默认情况下它们未启用,因为它们会减慢编译速度。我没有花时间调查到底有多少。

关于c++ - 将 OSX Clang 配置为对 include 语句区分大小写,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26182372/

69 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com