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

Add warnings options #90

Merged
merged 15 commits into from
May 28, 2024
Merged

Conversation

Alex-PLACET
Copy link
Contributor

Implement #88

# Conflicts:
#	include/sparrow/c_interface.hpp
Copy link
Member

@jjerphan jjerphan left a comment

Choose a reason for hiding this comment

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

LGTM modulo a few comments and questions.

include/sparrow/dynamic_bitset.hpp Outdated Show resolved Hide resolved
test/test_iterator.cpp Show resolved Hide resolved
test/test_typed_array.cpp Show resolved Hide resolved
test/CMakeLists.txt Outdated Show resolved Hide resolved
include/sparrow/buffer.hpp Outdated Show resolved Hide resolved
Copy link
Member

@jjerphan jjerphan left a comment

Choose a reason for hiding this comment

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

LGTM.

It seems that a few files aren't formatted (this need not be addressed IMO).

include/sparrow/array_data.hpp Outdated Show resolved Hide resolved
include/sparrow/contracts.hpp Outdated Show resolved Hide resolved
include/sparrow/contracts.hpp Show resolved Hide resolved
include/sparrow/data_type.hpp Outdated Show resolved Hide resolved
include/sparrow/dynamic_bitset.hpp Outdated Show resolved Hide resolved
include/sparrow/dynamic_bitset.hpp Outdated Show resolved Hide resolved
include/sparrow/dynamic_bitset.hpp Show resolved Hide resolved
include/sparrow/dynamic_bitset.hpp Show resolved Hide resolved
include/sparrow/mp_utils.hpp Outdated Show resolved Hide resolved
test/CMakeLists.txt Show resolved Hide resolved
# /w14928 # illegal copy-initialization; more than one user-defined conversion has been implicitly applied
# /we4289 # nonstandard extension used: 'variable': loop control variable declared in the for-loop is used outside the for-loop scope
# /we4244 # conversion from 'type1' to 'type_2', possible loss of data
/Wall # all warnings
Copy link
Contributor

Choose a reason for hiding this comment

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

This one is not recommended (see https://github.com/cpp-best-practices/cppbestpractices/blob/master/02-Use_the_Tools_Available.md#msvc ).
I suspect removing this will make the rest work better.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As I said in this comment https://github.com/xtensor-stack/sparrow/pull/90/files/166a1fd555ec981620e3b152c0e13872a3183be2#r1609579182, we have two choices, Wall and deactivate the problematic ones or activate warnings one by one

Copy link
Contributor

@Klaim Klaim May 27, 2024

Choose a reason for hiding this comment

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

No because /Wall activates warning from dependencies (in addition to warning-as-error), which is what Turner points and dont recommend. It's not something we can easilly turn off without dependency-specific flags. That's why it's not recommended with msvc. It's not like gcc/clang's -Wall which does not activate all warnings, but only recomended ones.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's the point of using /external:anglebrackets /external:W0 which deactivate warnings from the std and third parties (everything included with angle brackets)

Copy link
Contributor

Choose a reason for hiding this comment

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

It is not enough to disable the dependencies included through " :/

Copy link
Contributor

@Klaim Klaim left a comment

Choose a reason for hiding this comment

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

LGTM except the msvc warning flags but it will be easier for me (who has a windows always available) to check these and patch after this is merge.

@JohanMabille JohanMabille merged commit d832bd0 into xtensor-stack:main May 28, 2024
25 checks passed
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

4 participants