[libcxx-commits] [libcxx] [libcxx][P1831R1] Deprecating volatile: library (PR #101439)
Josh Karns via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 15 15:24:34 PDT 2024
jkarns275 wrote:
The `generic-modules` test is consistently broken on my end:
```
/Library/Developer/CommandLineTools/usr/bin/c++ /Users/josh/Development/llvm-project/libcxx/test/libcxx/atomics/atomics.types.operations/atomic_volatile_require_lock_free_in_cxx20.verify.cpp -pthread -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk --target=arm64-apple-darwin23.6.0 -nostdinc++ -I /Users/josh/Development/llvm-project/build/generic-modules/include/c++/v1 -I /Users/josh/Development/llvm-project/build/generic-modules/include/c++/v1 -I /Users/josh/Development/llvm-project/libcxx/test/support -std=c++2b -fmodules -fcxx-modules -fmodules-cache-path=/Users/josh/Development/llvm-project/build/generic-modules/test/ModuleCache -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wdeprecated-copy -Wdeprecated-copy-dtor -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -Werror=thread-safety -Wuser-defined-warnings -fsyntax-only -Wno-error -Xclang -verify -Xclang -verify-ignore-unexpected=note -ferror-limit=0
# executed command: /Library/Developer/CommandLineTools/usr/bin/c++ /Users/josh/Development/llvm-project/libcxx/test/libcxx/atomics/atomics.types.operations/atomic_volatile_require_lock_free_in_cxx20.verify.cpp -pthread -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.4.sdk --target=arm64-apple-darwin23.6.0 -nostdinc++ -I /Users/josh/Development/llvm-project/build/generic-modules/include/c++/v1 -I /Users/josh/Development/llvm-project/build/generic-modules/include/c++/v1 -I /Users/josh/Development/llvm-project/libcxx/test/support -std=c++2b -fmodules -fcxx-modules -fmodules-cache-path=/Users/josh/Development/llvm-project/build/generic-modules/test/ModuleCache -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wdeprecated-copy -Wdeprecated-copy-dtor -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -Werror=thread-safety -Wuser-defined-warnings -fsyntax-only -Wno-error -Xclang -verify -Xclang -verify-ignore-unexpected=note -ferror-limit=0
# .---command stderr------------
# | error: 'warning' diagnostics expected but not seen:
# | File * Line * (directive at /Users/josh/Development/llvm-project/libcxx/test/libcxx/atomics/atomics.types.operations/atomic_volatile_require_lock_free_in_cxx20.verify.cpp:53): '__deprecated_if_not_always_lock_free<arr, false>' is deprecated: volatile atomic operations are deprecated when std::atomic<T>::is_always_lock_free is false
# | File * Line * (directive at /Users/josh/Development/llvm-project/libcxx/test/libcxx/atomics/atomics.types.operations/atomic_volatile_require_lock_free_in_cxx20.verify.cpp:56): '__deprecated_if_not_always_lock_free<arr, false>' is deprecated: volatile atomic operations are deprecated when std::atomic<T>::is_always_lock_free is false
# | File * Line * (directive at /Users/josh/Development/llvm-project/libcxx/test/libcxx/atomics/atomics.types.operations/atomic_volatile_require_lock_free_in_cxx20.verify.cpp:59): '__deprecated_if_not_always_lock_free<arr, false>' is deprecated: volatile atomic operations are deprecated when std::atomic<T>::is_always_lock_free is false
# | File * Line * (directive at /Users/josh/Development/llvm-project/libcxx/test/libcxx/atomics/atomics.types.operations/atomic_volatile_require_lock_free_in_cxx20.verify.cpp:62): '__deprecated_if_not_always_lock_free<arr, false>' is deprecated: volatile atomic operations are deprecated when std::atomic<T>::is_always_lock_free is false
# | File * Line * (directive at /Users/josh/Development/llvm-project/libcxx/test/libcxx/atomics/atomics.types.operations/atomic_volatile_require_lock_free_in_cxx20.verify.cpp:65): '__deprecated_if_not_always_lock_free<arr, false>' is deprecated: volatile atomic operations are deprecated when std::atomic<T>::is_always_lock_free is false
# | File * Line * (directive at /Users/josh/Development/llvm-project/libcxx/test/libcxx/atomics/atomics.types.operations/atomic_volatile_require_lock_free_in_cxx20.verify.cpp:68): '__deprecated_if_not_always_lock_free<arr, false>' is deprecated: volatile atomic operations are deprecated when std::atomic<T>::is_always_lock_free is false
# | File * Line * (directive at /Users/josh/Development/llvm-project/libcxx/test/libcxx/atomics/atomics.types.operations/atomic_volatile_require_lock_free_in_cxx20.verify.cpp:71): '__deprecated_if_not_always_lock_free<arr, false>' is deprecated: volatile atomic operations are deprecated when std::atomic<T>::is_always_lock_free is false
# | File * Line * (directive at /Users/josh/Development/llvm-project/libcxx/test/libcxx/atomics/atomics.types.operations/atomic_volatile_require_lock_free_in_cxx20.verify.cpp:74): '__deprecated_if_not_always_lock_free<arr, false>' is deprecated: volatile atomic operations are deprecated when std::atomic<T>::is_always_lock_free is false
# | File * Line * (directive at /Users/josh/Development/llvm-project/libcxx/test/libcxx/atomics/atomics.types.operations/atomic_volatile_require_lock_free_in_cxx20.verify.cpp:77): '__deprecated_if_not_always_lock_free<arr, false>' is deprecated: volatile atomic operations are deprecated when std::atomic<T>::is_always_lock_free is false
# | File * Line * (directive at /Users/josh/Development/llvm-project/libcxx/test/libcxx/atomics/atomics.types.operations/atomic_volatile_require_lock_free_in_cxx20.verify.cpp:82): '__deprecated_if_not_always_lock_free<arr2, false>' is deprecated: volatile atomic operations are deprecated when std::atomic<T>::is_always_lock_free is false
# | File * Line * (directive at /Users/josh/Development/llvm-project/libcxx/test/libcxx/atomics/atomics.types.operations/atomic_volatile_require_lock_free_in_cxx20.verify.cpp:85): '__deprecated_if_not_always_lock_free<arr2, false>' is deprecated: volatile atomic operations are deprecated when std::atomic<T>::is_always_lock_free is false
# | 11 errors generated.
```
It seems like using a deprecated method doesn't trigger the warning in the case of a precompiled module - is this expected behavior?
https://github.com/llvm/llvm-project/pull/101439
More information about the libcxx-commits
mailing list