-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
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
MAINT: Squelch parenthesis warnings from GCC #8655
Conversation
numpy/linalg/lapack_lite/blas_lite.c
Outdated
it's readable, and we know what is written is correct. So don't warn about | ||
them. | ||
*/ | ||
#pragma GCC diagnostic ignored "-Wparentheses" |
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.
I suspect you want to make this depend on gcc, e.g.,
#if defined(__GNUC__)
#pragma GCC diagnostic ignored "-Wparentheses"
#endif
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.
Yep, that seems sane. Is that the right macro to switch on?
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.
Yep, seems to be
These were previously avoided by patching f2c, but this was more work for little gain, and the patch was not committed.
331fd2c
to
77f43f0
Compare
@charris: done |
This all looks OK, but wouldn't it make more sense to remove the compiler option in |
@mhvk: Argument against that would be that some files do want to be compiled with that warning (admittedly just Either way, it seems neater to pair the warning suppression with the faulty generator that causes those warnings |
The warning is enabled by |
@@ -16,6 +16,15 @@ extern doublereal dlamch_(char *); | |||
|
|||
extern doublereal dlapy2_(doublereal *x, doublereal *y); | |||
|
|||
/* |
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.
Multiline comments like
/*
* blah
* blah
*/
usw.
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.
Note that right now all the generated code goes through a comment transformation script (starting from /* ... */
at the ends of each line) that makes them look like the one I wrote.
Internal-to-lapack_lite
consistency seems more valuable here (see also: python_xerbla.c
)
We do have a style guide, |
Oh, well, it was worth a try. |
Thanks Eric. |
These were previously avoided by patching f2c, but this was more work for
little gain, and the patch was not committed.