-
Notifications
You must be signed in to change notification settings - Fork 6
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
Conversation
# Conflicts: # include/sparrow/c_interface.hpp
807f903
to
530cffe
Compare
There was a problem hiding this 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.
There was a problem hiding this 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).
# /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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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 "
:/
There was a problem hiding this 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.
Implement #88