Skip to content

Accept GCC warnings without an option suffix #159336

Closed as not planned
Closed as not planned

Description

@esadomer

The GCC parser in Tools/build/check_warnings.py accepts a warning without an option suffix in its regular expression, then fails while extracting the absent group. This also occurs with compiler output that omits diagnostic option names.

Reproducer, run with the interpreter built from the CPython checkout:

import sys
sys.path.insert(0, 'Tools/build')
import check_warnings

result = check_warnings.extract_warnings_from_compiler_output(
    'source.c:1:2: warning: example', 'gcc')
print(result)

Expected: The warning is returned with an empty option field.

Observed: The parser reports that it cannot extract the warning and exits with status 1.

Environment: CPython main, Windows debug build.

Linked PRs

Activity

  1. added a commit that references this issue on Oct 13, 2026
  2. added
    buildThe build process and cross-build
    on Oct 14, 2026
  3. picnixz commented on Oct 14, 2026

    @picnixz
    Member

    The tools is meant for internal use. I don't think it's necessary to change that until we need to.

  4. added
    pendingThe issue will be closed if no feedback is provided
    on Oct 14, 2026
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

    buildThe build process and cross-buildpendingThe issue will be closed if no feedback is provided

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions