I'm trying to build Python (2.6) with GCC the option -Wwrite-strings. 1 - Is there any interest on this? 2 - What should I do for the very common (taken from int_new): static char *kwlist[] = {"x", "base", 0}; I was able to remove all the warning in Objects/*, except those related to (2). -- Lisandro Dalcín --------------- Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC) Instituto de Desarrollo Tecnológico para la Industria Química (INTEC) Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET) PTLC - Güemes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594
I'm trying to build Python (2.6) with GCC the option -Wwrite-strings.
1 - Is there any interest on this?
It might be nice to have, but will certainly come at a cost. So feel free to try this out; at the end, we might agree that this change is too intrusive.
2 - What should I do for the very common (taken from int_new): static char *kwlist[] = {"x", "base", 0};
What's wrong with static const char *kwlist[] = {"x", "base", 0}; Regards, Martin
Hi Martin, On Fri, Sep 28, 2007 at 11:09:54PM +0200, "Martin v. Löwis" wrote:
What's wrong with
static const char *kwlist[] = {"x", "base", 0};
The following goes wrong if we try again to walk this path: http://mail.python.org/pipermail/python-dev/2006-February/060689.html Armin
Yes, you are completely right. I ended up realizing that a change like this would break almost all third-party extension. But... What about of doing this for Py3K? Third-party extension have to be fixed anyway. On 10/1/07, Armin Rigo <arigo@tunes.org> wrote:
Hi Martin,
On Fri, Sep 28, 2007 at 11:09:54PM +0200, "Martin v. Löwis" wrote:
What's wrong with
static const char *kwlist[] = {"x", "base", 0};
The following goes wrong if we try again to walk this path: http://mail.python.org/pipermail/python-dev/2006-February/060689.html
Armin
-- Lisandro Dalcín --------------- Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC) Instituto de Desarrollo Tecnológico para la Industria Química (INTEC) Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET) PTLC - Güemes 3450, (3000) Santa Fe, Argentina Tel/Fax: +54-(0)342-451.1594
participants (3)
-
"Martin v. Löwis"
-
Armin Rigo
-
Lisandro Dalcin