[all-commits] [llvm/llvm-project] bbd871: [libc++] Don't implement <stdatomic.h> before C++2...

Louis Dionne via All-commits all-commits at lists.llvm.org
Fri Jan 17 11:23:02 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bbd871e2baad2e74dbde202823b3439d2a96d3f8
      https://github.com/llvm/llvm-project/commit/bbd871e2baad2e74dbde202823b3439d2a96d3f8
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2025-01-17 (Fri, 17 Jan 2025)

  Changed paths:
    M libcxx/include/atomic
    M libcxx/include/stdatomic.h
    M libcxx/test/libcxx/atomics/atomics.syn/compatible_with_stdatomic.compile.pass.cpp
    A libcxx/test/libcxx/atomics/atomics.syn/incompatible_with_stdatomic.verify.cpp
    A libcxx/test/libcxx/atomics/stdatomic.h.syn/dont_hijack_header.compile.pass.cpp
    A libcxx/test/libcxx/atomics/stdatomic.h.syn/dont_hijack_header.cxx23.compile.pass.cpp

  Log Message:
  -----------
  [libc++] Don't implement <stdatomic.h> before C++23 (#123130)

https://github.com/llvm/llvm-project/pull/95498 implemented a libc++
extension where <stdatomic.h> would forward to <atomic> even before
C++23. Unfortunately, this was found to be a breaking change (with
fairly widespread impact) since that changes whether _Atomic(T) is a C
style atomic or std::atomic<T>. In principle, this can even be an ABI
break.

We generally don't implement extensions in libc++ because they cause so
many problems, and that extension had been accepted because it was
deemed pretty small and only a quality of life improvement. Since it has
widespread impact on valid C++20 (and before) code, this patch removes
the extension before we ship it in any public release.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list