[petsc-dev] Use -Wshadow on pipelines?
Jacob Faibussowitsch
jacob.fai at gmail.com
Sun Aug 9 18:55:33 CDT 2020
Hello All,
I discovered a rather obscure set of compiler flags -Wshadow, -Wshadow=local, -Wshadow=compatible-local while trying to track down a bug which warn about local redefinition of a variable. Out of curiosity I also recompiled petsc with this flag and lo and behold the src is littered with shadowed variables. From what I can tell most are likely harmless — defining an iterator variable in the beginning of the function with all the rest of the variables, then redefining it later in some loop — but maybe we should consider adding this as a CI flag as it isn’t activated by -Wall.
Best regards,
Jacob Faibussowitsch
(Jacob Fai - booss - oh - vitch)
Cell: (312) 694-3391
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20200809/d0dc433b/attachment.html>
More information about the petsc-dev
mailing list