-
Bug
-
Resolution: Unresolved
-
Not Prioritized
-
Code Generation Tools
-
CODEGEN-8548
-
ARM_20.2.4.LTS
-
default
The attached test case has a file named try1.cpp with these lines ...
#include <regex> int a;
It also has a sub-directory named subdir that contains a file named mutex.hpp with this line ...
#warn This is not expected
Build it ...
% armcl -Isubdir try1.cpp "subdir\mutex.hpp", line 1: warning: #warning directive: This is not expected "C:\ti\compilers\ti-cgt-arm_20.2.4.LTS\include\libcxx\__locale", line 166: error: identifier "once_flag" is undefined "C:\ti\compilers\ti-cgt-arm_20.2.4.LTS\include\libcxx\__locale", line 171: error: constexpr "std::__2::locale::id::id()" provides no initializer for: member "std::__2::locale::id::__flag_" 2 errors detected in the compilation of "try1.cpp". >> Compilation failure
The system header file <regex> includes <mutex>. But the user header file "mutex.hpp" is included instead. <mutex> defines the structure once_flag, and <__locale> refers to it. Because once_flag is not defined, the error diagnostics occur.