Skip to content

clang-cl issues many warnings when building on Windows #131296

Open
@chris-eibl

Description

@chris-eibl

See e.g. https://github.com/python/cpython/actions/runs/13681800146/job/38255779088.

I went through roughly 100 warnings to find this one #131020.

Others are mostly benign, yet I'd like to reduce them.

Since many of the warnings stem from pythoncore, we see them twice, because the _freeze_module compiles a lot of those *.c files, too - and in case of PGO we see them a third time in the PGUpdate phase.

E.g. a bunch of warnings will disappear after the next sync with hacl-star upstream, since @msprotz thankfully already merged hacl-star/hacl-star#1028.

I think it is best to do them in small PRs per *.c file.

Ideally, I'd like to end up with the same warning configuration as used on Linux. When I configure for clang in WSL, I get

CONFIGURE_CFLAGS_NODIST= -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden

This would currently generate even more warnings, since we currently use

<AdditionalOptions>-Wno-deprecated-non-prototype -Wno-unused-label -Wno-pointer-sign -Wno-incompatible-pointer-types-discards-qualifiers -Wno-unused-function %(AdditionalOptions)</AdditionalOptions>

So maybe I should do this after a first round of cleaning?

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-windowsbuildThe build process and cross-buildtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions