NVIDIA / NVIDIA/stdexec

`gcc`: a lot of `-Werror=shadow` related errors for the `Hello, world !` example

Open
#1,407 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
2.4k
Forks
270
Avg merge
3d 6h
Merged PRs (30d)
39

Description

Example at https://github.com/NVIDIA/stdexec/blob/8bc7c7f06fe39831dea6852407ebe7f6be8fa9fd/include/stdexec/__detail/__basic_sender.hpp#L408:

/workspaces/.../external/stdexec/include/exec/../stdexec/__detail/__basic_sender.hpp: In member function 'void stdexec::__detail::__op_state<_Sexpr, _Receiver>::start() &':
/workspaces/.../external/stdexec/include/exec/../stdexec/__detail/__basic_sender.hpp:408:15: error: declaration of 'using __tag_t = using __tag_t = typename decltype (__mdecay<_Ty>)::__f<_Ty>::__desc_t::__tag' shadows a member of 'stdexec::__detail::__op_state<_Sexpr, _Receiver>' [-Werror=shadow]
  408 |         using __tag_t = typename __op_state::__tag_t;
      |               ^~~~~~~
/workspaces/.../external/stdexec/include/exec/../stdexec/__detail/__basic_sender.hpp:382:13: note: shadowed declaration is here
  382 |       using __tag_t = typename __desc_t::__tag;
      |             ^~~~~~~

I guess that this should be resolved, as it might hide bugs ?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with include/stdexec/__detail/__basic_sender.hpp, especially the declarations around lines 382 and 408 shown in the report, and build the Hello, world! example with GCC and -Werror=shadow. Find the other shadow diagnostics in the example build and resolve them without changing behavior; done means the example builds without these errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.