Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing obsolete eigen.h warning suppression pragmas. #3198

Merged
merged 10 commits into from
Aug 17, 2021

Conversation

rwgk
Copy link
Collaborator

@rwgk rwgk commented Aug 15, 2021

Long story short: the pragmas in eigen.h are simply not needed when using -isystem, as all non-Windows CI jobs do.

A HINT ... use -isystem was added to eigen.h.

For MSVC the existing PYBIND11_SILENCE_MSVC_C4127 macro was added in 4 locations.

For completeness, the existing pragmas have several issues:

Luckily, we can just purge the pragmas completely.

Suggested changelog entry:

Legacy warning suppression pragma were removed from eigen.h. On Unix platforms, please use -isystem for Eigen include directories, to suppress compiler warnings originating from Eigen headers. Note that cmake does this by default. No adjustments are needed for Windows.

@rwgk rwgk changed the title [WIP] eigen.h pragma cleanup [WIP] eigen.h pragma modernization. Aug 15, 2021
@rwgk rwgk changed the title [WIP] eigen.h pragma modernization. [WIP] eigen.h warning suppressions pragma modernization. Aug 15, 2021
@rwgk rwgk force-pushed the eigen_pragma branch 2 times, most recently from 5311594 to de66873 Compare August 15, 2021 22:04
… 3.14 or newer).

Also changing all `cmake -t` to `--target`, `-v` to `--verbose`, `check` to `pytest`, for consistency (to make it easier to pin-point all commands of a certain type).

Also removing one `-j 2` for `pytest` in hopes of reducing flakes due to races in test_iostream and in prints from destructors.
@rwgk rwgk changed the title [WIP] eigen.h warning suppressions pragma modernization. Removing obsolete eigen.h warning suppressions pragmas. Aug 16, 2021
@rwgk rwgk changed the title Removing obsolete eigen.h warning suppressions pragmas. Removing obsolete eigen.h warning suppression pragmas. Aug 16, 2021
…tely. BTW: in the last CI run there was still a test_iostream flake, even without the -j 2 for running the tests (verfied by inspecting the log).
@rwgk
Copy link
Collaborator Author

rwgk commented Aug 17, 2021

Thanks @Skylion007!

@rwgk rwgk merged commit 774b5ff into pybind:master Aug 17, 2021
@rwgk rwgk deleted the eigen_pragma branch August 17, 2021 23:49
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Aug 17, 2021
@henryiii henryiii removed the needs changelog Possibly needs a changelog entry label Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants