Actions
Bug #5391
closedC2y extension warning with clang 22
Start date:
Due date:
% Done:
100%
Estimated time:
Description
__COUNTER__ is used heavily by Boost.Test and clang 22 started to complain about it.
../tests/benchmarks/encoding.cpp:94:1: error: '__COUNTER__' is a C2y extension [-Werror,-Wc2y-extensions]
94 | BOOST_AUTO_TEST_CASE_TEMPLATE(ReadVarNumber, Test, ReadVarNumberTests)
| ^
/usr/include/boost/test/unit_test_suite.hpp:265:73: note: expanded from macro 'BOOST_AUTO_TEST_CASE_TEMPLATE'
265 | #define BOOST_AUTO_TEST_CASE_TEMPLATE( test_name, type_name, TL ) \
| ^
/usr/include/boost/test/unit_test_suite.hpp:250:73: note: expanded from macro '\
BOOST_FIXTURE_TEST_CASE_TEMPLATE'
250 | \
| ^
/usr/include/boost/test/unit_test_suite.hpp:368:68: note: expanded from macro '\
BOOST_AUTO_TU_REGISTRAR'
368 | static boost::unit_test::ut_detail::auto_test_unit_registrar \
| ^
/usr/include/boost/test/unit_test_suite.hpp:358:45: note: expanded from macro '\
BOOST_TEST_APPEND_UNIQUE_ID'
358 | BOOST_JOIN( BOOST_JOIN( name, __LINE__ ), __COUNTER__)
| ^
1 error generated.
Updated by Davide Pesavento 16 days ago
- Status changed from New to In Progress
This was fixed (or rather suppressed) in Boost 1.91 (commit).
We can safely disable this warning on our side as well.
Updated by Davide Pesavento 15 days ago
- Status changed from In Progress to Code review
Updated by Davide Pesavento 13 days ago
- Status changed from Code review to Closed
- % Done changed from 0 to 100
Actions