Since clang 16 (and gcc 11) the default C++ standard is now gnu++17. Because devel/py-greenlet's build infrastructure does not explicitly set its C++ standard, this leads to several errors: In file included from src/greenlet/greenlet.cpp:21: In file included from src/greenlet/greenlet_slp_switch.hpp:82: In file included from src/greenlet/slp_platformselect.h:18: src/greenlet/platform/switch_x86_unix.h:54:5: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] register int *stackref, stsizediff; ^~~~~~~~~ src/greenlet/platform/switch_x86_unix.h:54:5: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] register int *stackref, stsizediff; ^~~~~~~~~ The register keyword has already been removed from the similar switch_amd64_unix.h header, which is why the above problem does not occur on amd64. To work around the errors, define the register keyword away using CPPFLAGS.
Created attachment 242483 [details] devel/py-greenlet: fix build with clang 16 on i386
LGTM. Thanks.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=e13b0edc8bb2f696676715abd54d65b9c0403b66 commit e13b0edc8bb2f696676715abd54d65b9c0403b66 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2023-05-29 18:22:34 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2023-06-05 17:19:29 +0000 devel/py-greenlet: fix build with clang 16 on i386 Since clang 16 (and gcc 11) the default C++ standard is now gnu++17. Because devel/py-greenlet's build infrastructure does not explicitly set its C++ standard, this leads to several errors: In file included from src/greenlet/greenlet.cpp:21: In file included from src/greenlet/greenlet_slp_switch.hpp:82: In file included from src/greenlet/slp_platformselect.h:18: src/greenlet/platform/switch_x86_unix.h:54:5: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] register int *stackref, stsizediff; ^~~~~~~~~ src/greenlet/platform/switch_x86_unix.h:54:5: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] register int *stackref, stsizediff; ^~~~~~~~~ The register keyword has already been removed from the similar switch_amd64_unix.h header, which is why the above problem does not occur on amd64. To work around the errors, define the register keyword away using CPPFLAGS. PR: 271712 Approved by: sunpoet (maintainer) MFH: 2023Q2 devel/py-greenlet/Makefile | 3 +++ 1 file changed, 3 insertions(+)