https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109625
Bug ID: 109625 Summary: [14 regression] 'error: use of built-in trait ‘__type_pack_element<sizeof ... (T ...) - 1, T ...>’ in function signature; use library traits instead' when building folly Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: sjames at gcc dot gnu.org CC: arsen at gcc dot gnu.org, ppalka at gcc dot gnu.org Target Milestone: --- Created attachment 54917 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54917&action=edit Unicode.cpp.ii.xz Not sure if this is a GCC issue or not, but it's a new compile failure of folly-2023.04.10.00 with GCC 14.0.0 20230423: ``` FAILED: CMakeFiles/folly_base.dir/folly/Unicode.cpp.o /usr/bin/aarch64-unknown-linux-gnu-g++ -DBOOST_ATOMIC_DYN_LINK -DBOOST_ATOMIC_NO_LIB -DBOOST_CONTEXT_DYN_LINK -DBOOST_CONTEXT_NO_LIB -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_FILESYSTEM_NO_LIB -DBOOST_PROGRAM_OPTIONS_DYN_LINK -DBOOST_PROGRAM_OPTIONS_NO_LIB -DBOOST_REGEX_DYN_LINK -DBOOST_REGEX_NO_LIB -DBOOST_SYSTEM_DYN_LINK -DBOOST_SYSTEM_NO_LIB -DBOOST_THREAD_DYN_LINK -DBOOST_THREAD_NO_LIB -DFMT_SHARED -DFOLLY_XLOG_STRIP_PREFIXES=\"/var/tmp/portage/dev-cpp/folly-2023.04.10.00/work/folly-2023.04.10.00:/var/tmp/portage/dev-cpp/folly-2023.04.10.00/work/folly-2023.04.10.00_build\" -DGFLAGS_IS_A_DLL=0 -D_GNU_SOURCE -D_REENTRANT -I/var/tmp/portage/dev-cpp/folly-2023.04.10.00/work/folly-2023.04.10.00 -I/var/tmp/portage/dev-cpp/folly-2023.04.10.00/work/folly-2023.04.10.00_build -I/usr/include/libiberty -O2 -pipe -mcpu=native -fPIC -fcoroutines -g -std=gnu++1z -finput-charset=UTF-8 -fsigned-char -Wall -Wno-deprecated -Wno-deprecated-declarations -Wno-sign-compare -Wno-unused -Wuninitialized -Wunused-label -Wunused-result -Wshadow-compatible-local -Wno-noexcept-type -faligned-new -fopenmp -std=gnu++17 -MD -MT CMakeFiles/folly_base.dir/folly/Unicode.cpp.o -MF CMakeFiles/folly_base.dir/folly/Unicode.cpp.o.d -o CMakeFiles/folly_base.dir/folly/Unicode.cpp.o -c /var/tmp/portage/dev-cpp/folly-2023.04.10.00/work/folly-2023.04.10.00/folly/Unicode.cpp In file included from /var/tmp/portage/dev-cpp/folly-2023.04.10.00/work/folly-2023.04.10.00/folly/Unicode.cpp:21: /var/tmp/portage/dev-cpp/folly-2023.04.10.00/work/folly-2023.04.10.00/folly/Conv.h: In instantiation of ‘folly::detail::LastElement<Ts ...>& folly::detail::getLastElement(const Ts& ...) [with Ts = {char [26], unsigned int, char [4], unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*}]’: /var/tmp/portage/dev-cpp/folly-2023.04.10.00/work/folly-2023.04.10.00/folly/Conv.h:312:27: error: use of built-in trait ‘__type_pack_element<sizeof ... (T ...) - 1, T ...>’ in function signature; use library traits instead 312 | const LastElement<Ts...>& getLastElement(const Ts&... ts) { | ^~~~~~~~~~~~~~ /var/tmp/portage/dev-cpp/folly-2023.04.10.00/work/folly-2023.04.10.00/folly/Conv.h: In instantiation of ‘folly::detail::LastElement<Ts ...>& folly::detail::getLastElement(const Ts& ...) [with Ts = {char [26], unsigned int, char [6], unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*}]’: /var/tmp/portage/dev-cpp/folly-2023.04.10.00/work/folly-2023.04.10.00/folly/Conv.h:312:27: error: use of built-in trait ‘__type_pack_element<sizeof ... (T ...) - 1, T ...>’ in function signature; use library traits instead [...] ``` --- ``` $ /usr/bin/aarch64-unknown-linux-gnu-g++ -O2 -fcoroutines -std=gnu++1z -finput-charset=UTF-8 -fsigned-char -faligned-new -fopenmp -std=gnu++17 -c Unicode.cpp.ii In file included from /var/tmp/portage/dev-cpp/folly-2023.04.10.00/work/folly-2023.04.10.00/folly/Unicode.cpp:21: /var/tmp/portage/dev-cpp/folly-2023.04.10.00/work/folly-2023.04.10.00/folly/Conv.h: In instantiation of ‘folly::detail::LastElement<Ts ...>& folly::detail::getLastElement(const Ts& ...) [with Ts = {char [26], unsigned int, char [4], unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*}]’: /var/tmp/portage/dev-cpp/folly-2023.04.10.00/work/folly-2023.04.10.00/folly/Conv.h:312:27: error: use of built-in trait ‘__type_pack_element<sizeof ... (T ...) - 1, T ...>’ in function signature; use library traits instead 312 | const LastElement<Ts...>& getLastElement(const Ts&... ts) { | ^~~~~~~~~~~~~~ [...] ```