oneTBB icon indicating copy to clipboard operation
oneTBB copied to clipboard

tbb_2020: fix build on gcc-13

Open trofi opened this issue 2 years ago • 0 comments

On gcc-13 build started failing due to 'task' identifier collision as:

../../include/tbb/task.h:300:20: error: declaration of 'tbb::task& tbb::internal::task_prefix::task()' changes meaning of 'task' [-fpermissive]
  300 |         tbb::task& task() {return *reinterpret_cast<tbb::task*>(this+1);}
      |                    ^~~~
../../include/tbb/task.h:252:9: note: used here to mean 'class tbb::task'
  252 |         task* next_offloaded;
      |         ^~~~
../../include/tbb/task.h:43:7: note: declared here
   43 | class task;
      |       ^~~~

The change adds explicit qualifier to class name to avoid ambiguity with method name.

Description

Add a comprehensive description of proposed changes

Fixes # - issue number(s) if exists

  • [x] - git commit message contains an appropriate signed-off-by string (see CONTRIBUTING.md for details)

Type of change

Choose one or multiple, leave empty if none of the other choices apply

Add a respective label(s) to PR if you have permissions

  • [x] bug fix - change that fixes an issue
  • [ ] new feature - change that adds functionality
  • [ ] tests - change in tests
  • [ ] infrastructure - change in infrastructure and CI
  • [ ] documentation - documentation update

Tests

  • [ ] added - required for new features and some bug fixes
  • [x] not needed

Documentation

  • [ ] updated in # - add PR number
  • [ ] needs to be updated
  • [x] not needed

Breaks backward compatibility

  • [ ] Yes
  • [x] No
  • [ ] Unknown

Notify the following users

List users with @ to send notifications

Other information

trofi avatar May 20 '22 06:05 trofi