Skip to content

The process tests do not build with gcc: a test's reader shadows itself #229

Closed

Description

@siracozmen01

What goes wrong

Main's check on dff8e53 (#227) fails: the gcc-debug tree does not build.

modules/process/tests/child_test.cpp:159:37: error: declaration of 'kRead' shadows a previous local [-Werror=shadow]
FAILED: gcc-debug build
check full FAILED (1) in 813s

In AChildIsNotGivenTheVariablesWithheldFromIt, the lambda kRead declares its output path under the same name, kRead. gcc 14 counts that as shadowing the enclosing local under -Wshadow; clang does not. A pull request's check builds the clang trees only, so #227 passed it, and the failure showed first on main's full tier. Every check of main fails the same way until it is fixed.

What should happen

The test names its output path apart from the lambda, and gcc-debug builds again.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions