Skip to content

pycore_optimizer_types.h‎ needs to include stdbool.h #143943

@jmroot

Description

@jmroot

Bug report

Bug description:

aeb3403 moved some code using the bool type from pycore_optimizer.h‎, which includes stdbool.h, to pycore_optimizer_types.h‎, which does not. As a result, depending on the internal details of your libc headers, you can now get a compile error like:

In file included from Parser/pegen_errors.c:5:
In file included from ./Include/internal/pycore_runtime.h:11:
In file included from ./Include/internal/pycore_runtime_structs.h:10:
In file included from ./Include/internal/pycore_interp_structs.h:15:
In file included from ./Include/internal/pycore_tstate.h:15:
./Include/internal/pycore_optimizer_types.h:70:5: error: unknown type name 'bool'
    bool invert;
    ^

CPython versions tested on:

3.15

Operating systems tested on:

macOS

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions