20172, "benharsh", "Should the Chapel compiler support an option like -Wunused?", "2022-07-07T20:35:07Z"
I was recently caught off guard by an unused boolean result indicating an EOF error, a result that I did not check.
proc R.readThis(r : channel) {
r.read(someField); // ignores returned boolean
}
Should the Chapel compiler support a general option like "-Wunused" that warns for unused results?
Could this functionality be enabled or disabled on a per-module or per-function basis with some kind of pragma/attribute? It would be nice to check what results, if any, we are not using in our internal/standard modules.