Skip to content

[libc++] __bit reference: error: cannot add 'abi_tag' attribute in a redeclaration #136289

Open
@T-Maxxx

Description

@T-Maxxx
  • Clang: 20.1.3 (built from sources on tag)
  • Using libc++
  • C++20
  • Affected by Modules feature - got error by implementing one of base classes as module.
In file included from /home/tmax/programs/clang-20/bin/../include/c++/v1/chrono:1009:
In file included from /home/tmax/programs/clang-20/bin/../include/c++/v1/__chrono/formatter.h:29:
In file included from /home/tmax/programs/clang-20/bin/../include/c++/v1/__chrono/ostream.h:40:
In file included from /home/tmax/programs/clang-20/bin/../include/c++/v1/sstream:323:
In file included from /home/tmax/programs/clang-20/bin/../include/c++/v1/__ostream/basic_ostream.h:27:
In file included from /home/tmax/programs/clang-20/bin/../include/c++/v1/bitset:137:
/home/tmax/programs/clang-20/bin/../include/c++/v1/__bit_reference:189:31: error: cannot add 'abi_tag' attribute in a redeclaration
  189 | _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false> __copy_aligned(
      |                               ^
/home/tmax/programs/clang-20/bin/../include/c++/v1/__config:536:22: note: expanded from macro '_LIBCPP_HIDE_FROM_ABI'
  536 |       __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_ODR_SIGNATURE))))
      |                      ^
/home/tmax/programs/clang-20/bin/../include/c++/v1/__bit_reference:986:67: note: previous declaration is here
  986 |   _LIBCPP_CONSTEXPR_SINCE_CXX20 friend __bit_iterator<_Dp, false> __copy_aligned(
      |                                                                   ^

Another one

In file included from /home/tmax/programs/clang-20/bin/../include/c++/v1/vector:315:
In file included from /home/tmax/programs/clang-20/bin/../include/c++/v1/__vector/vector_bool.h:17:
/home/tmax/programs/clang-20/bin/../include/c++/v1/__bit_reference:189:31: error: cannot add 'abi_tag' attribute in a redeclaration
  189 | _LIBCPP_CONSTEXPR_SINCE_CXX20 _LIBCPP_HIDE_FROM_ABI __bit_iterator<_Cp, false> __copy_aligned(
      |                               ^
/home/tmax/programs/clang-20/bin/../include/c++/v1/__config:536:22: note: expanded from macro '_LIBCPP_HIDE_FROM_ABI'
  536 |       __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_ODR_SIGNATURE))))
      |                      ^
/home/tmax/programs/clang-20/bin/../include/c++/v1/__bit_reference:986:67: note: previous declaration is here
  986 |   _LIBCPP_CONSTEXPR_SINCE_CXX20 friend __bit_iterator<_Dp, false> __copy_aligned(

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang:modulesC++20 modules and Clang Header Moduleslibc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions