[Python-Dev] Baffled by PyArg_ParseTupleAndKeywords modification
"Martin v. Löwis"
martin at v.loewis.de
Fri Feb 10 20:18:53 CET 2006
Jeremy Hylton wrote:
> Ok. I reviewed the original problem and you're right, the problem was
> not that it failed outright but that it produced a warning about the
> deprecated conversion:
> warning: deprecated conversion from string constant to 'char*''
> I work at a place that takes the same attitude as python-dev about
> warnings: They're treated as errors and you can't check in code that
> the compiler generates warnings for.
In that specific case, I think the compiler's warning should be turned
off; it is a bug in the compiler if that specific warning cannot be
turned off separately.
While it is true that the conversion is deprecated, the C++ standard
defines this as
"Normative for the current edition of the Standard, but not guaranteed
to be part of the Standard in future revisions."
The current version is from 1998. I haven't been following closely,
but I believe there are no plans to actually remove the feature
in the next revision.
FWIW, Annex D also defines these features as deprecated:
- the use of "static" for objects in namespace scope (AFAICT
including C file-level static variables and functions)
- C library headers (i.e. <stdio.h>)
Don't you get a warning when including Python.h, because that
> Nonetheless, the consensus on the c++ sig and python-dev at the time
> was to fix Python. If we don't allow warnings in our compilations, we
> shouldn't require our users at accept warnings in theirs.
We don't allow warnings for "major compilers". This specific compiler
appears flawed (or your configuration of it).
More information about the Python-Dev