[Bug 282475] devel/protozero: fix build with clang 19

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 01 Nov 2024 18:17:47 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282475

            Bug ID: 282475
           Summary: devel/protozero: fix build with clang 19
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: amdmi3@FreeBSD.org
          Reporter: dim@FreeBSD.org
          Assignee: amdmi3@FreeBSD.org
             Flags: maintainer-feedback?(amdmi3@FreeBSD.org)

Clang 19 has become more strict about C++ extensions, which results in:

 
/wrkdirs/usr/ports/devel/protozero/work/protozero-1.7.1/test/t/bool/writer_test_cases.cpp:8:1:
error: passing no argument for the '...' parameter of a variadic macro is a
C++20 extension [-Werror,-Wc++20-extensions]
      8 | TEMPLATE_TEST_CASE("write bool field and check with libprotobuf", "",
        | ^
 
/wrkdirs/usr/ports/devel/protozero/work/protozero-1.7.1/test/catch/catch.hpp:17714:35:
note: expanded from macro 'TEMPLATE_TEST_CASE'
   17714 | #define TEMPLATE_TEST_CASE( ... ) INTERNAL_CATCH_TEMPLATE_TEST_CASE(
__VA_ARGS__ )
         |                                   ^
 
/wrkdirs/usr/ports/devel/protozero/work/protozero-1.7.1/test/catch/catch.hpp:1118:9:
note: expanded from macro 'INTERNAL_CATCH_TEMPLATE_TEST_CASE'
   1118 |         INTERNAL_CATCH_TEMPLATE_TEST_CASE_2(
INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_ ),
INTERNAL_CATCH_UNIQUE_NAME( C_A_T_C_H_T_E_M_P_L_A_T_E_T_E_S_T_F_U_N_C_ ), Name,
Tags, typename TestType, __VA_ARGS__ )
        |         ^
 
/wrkdirs/usr/ports/devel/protozero/work/protozero-1.7.1/test/catch/catch.hpp:1096:13:
note: expanded from macro 'INTERNAL_CATCH_TEMPLATE_TEST_CASE_2'
   1096 |            
INTERNAL_CATCH_NTTP_GEN(INTERNAL_CATCH_REMOVE_PARENS(Signature))\
        |             ^
 
/wrkdirs/usr/ports/devel/protozero/work/protozero-1.7.1/test/catch/catch.hpp:897:465:
note: expanded from macro 'INTERNAL_CATCH_NTTP_GEN'
    897 | #define INTERNAL_CATCH_NTTP_GEN(...)
INTERNAL_CATCH_VA_NARGS_IMPL(__VA_ARGS__, INTERNAL_CATCH_NTTP_1(__VA_ARGS__),
INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1(__VA_ARGS__),
INTERNAL_CATCH_NTTP_1(__VA_ARGS__), INTERNAL_CATCH_NTTP_1(__VA_ARGS__),
INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_1( __VA_ARGS__),
INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_1(
__VA_ARGS__),INTERNAL_CATCH_NTTP_1( __VA_ARGS__), INTERNAL_CATCH_NTTP_0)
        |                                                                      
                                                                               
                                                                               
                                                                               
                                                                               
                                                                          ^
 
/wrkdirs/usr/ports/devel/protozero/work/protozero-1.7.1/test/catch/catch.hpp:780:9:
note: macro 'INTERNAL_CATCH_VA_NARGS_IMPL' defined here
    780 | #define INTERNAL_CATCH_VA_NARGS_IMPL(_0, _1, _2, _3, _4, _5, _6, _7,
_8, _9, _10, N, ...) N
        |         ^

This can be fixed by patching catch.hpp so it uses the correct pragma to
suppress this warning, for clang >= 19.

-- 
You are receiving this mail because:
You are the assignee for the bug.