FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix various compiler warnings by aroffringa · Pull Request #2801 · xtensor-stack/xtensor · GitHub

Repository navigation

Fix various compiler warnings - #2801

Open
aroffringa wants to merge 3 commits into
xtensor-stack:masterfrom
aroffringa:fix-warnings
Open

aroffringa wants to merge 3 commits into
xtensor-stack:masterfrom
aroffringa:fix-warnings

Conversation

aroffringa commented Aug 1, 2024 •
edited
Loading

Copy link
Copy Markdown

These solve warnings when compiled with gcc 14 using a set of warnings enabled that we use in one of our projects:
-Wall
-Wnon-virtual-dtor
-Wzero-as-null-pointer-constant
-Wduplicated-branches
-Wundef
-Wvla
-Wpointer-arith
-Wextra
-Wno-unused-parameter

Checklist

  • The title and commit message(s) are descriptive.
  • Small commits made to fix your PR have been squashed to avoid history pollution.
  • Tests have been added for new features or bug fixes.
  • API of new functions and classes are documented.

Description

Copy link
Copy Markdown
Author

I note this overlaps to some part with #2781; is there a reason that PR has not been merged?

These solve warnings when compiled with gcc 14 using a set of warnings enabled that we use in one of our projects:
  -Wall
  -Wnon-virtual-dtor
  -Wzero-as-null-pointer-constant
  -Wduplicated-branches
  -Wundef
  -Wvla
  -Wpointer-arith
  -Wextra
  -Wno-unused-parameter
Comment thread include/xtensor/xassign.hpp Outdated
// in compilation error for expressions that do not provide a SIMD interface.
// simd_assign is true if simd_linear_assign() or simd_linear_assign(de1, de2)
// is true.
if constexpr(simd_assign) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This is C++17 while we advertise that xtensor is compatible with C++14.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks, that's good to know. I've changed the fix by using #pragma GCC statements to not get the warning.

This branch has not been deployed

No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL