[Python-Dev] Compiler warnings (original) (raw)
Tim Peters tim.peters at gmail.com
Wed Feb 1 03:19:41 CET 2006
- Previous message: [Python-Dev] Compiler warnings
- Next message: [Python-Dev] Compiler warnings
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Tim]
Well, that's pretty bizarre. There's obviously no way to get to a reference to
e
without going throughx = PyLongAsScaledDouble(vv, &e); first. That isn't a useful warning.
[Guido]
But how can the compiler know that it is an output-only argument?
In the absence of interprocedural analysis, it cannot -- and neither can it know that it's not an output argument. It can't know anything non-trivial, and because it can't, a reasonable compiler would avoid raising a red flag at "warning" level. "info", maybe, if it has such a concept. It's as silly to me as seeing, e.g.,
""" double recip(double z) { return 1.0 / z; }
"warning: possible division by 0 or signaling NaN" """
Perhaps, but not useful because there's no reason to presume it's a likely error.
- Previous message: [Python-Dev] Compiler warnings
- Next message: [Python-Dev] Compiler warnings
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]