Project

General

Profile

Actions

Bug #5391

open

C2y extension warning with clang 22

Added by Davide Pesavento 8 days ago.

Status:
New
Priority:
Normal
Category:
Build
Target version:
Start date:
Due date:
% Done:

0%

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.

No data to display

Actions

Also available in: Atom PDF