Various cleanups: extern "C"
#4143
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We've accumulated inconsistency between using our
_EXTERN_C
macro and directly sayingextern "C"
:STL/stl/inc/memory
Lines 3720 to 3723 in f392449
STL/stl/inc/__msvc_sanitizer_annotate_container.hpp
Lines 131 to 134 in f392449
The macro used to be important when some of our headers were dual C and C++. Now that they're always C++, and that we don't expect to play special games with
extern "C"
in the foreseeable future, we should resolve this inconsistency and favor dropping the macro.(In contrast, we're quite disciplined about
_STD_BEGIN
in product code, and I do want to play special games with it soon.)_EXTERN_C ... _END_EXTERN_C
=>extern "C" { ... } // extern "C"
// extern "C"
comments.stacktrace
's function pointer typedefs inextern "C"
.extern "C"
functions to restrict themselves to mentioning only things that are within theextern "C"
universe. During the initial modularization effort, I overhauledextern "C"
functions to mention onlyextern "C"
structs, where it did matter.sharedmutex.cpp
: Move the_Smtx_t
typedef withinextern "C"
.stl/inc/xthreads.h
:STL/stl/inc/xthreads.h
Lines 21 to 28 in f392449
_Atomic_memory_order_meow
asextern "C"
to match vcruntime._C_meow_complex
asextern "C"
to match the UCRT.