В сообщении от Среда 14 мая 2008 Lisandro Dalcin написал(a): > On 5/14/08, Kirill Smelkov <[EMAIL PROTECTED]> wrote: > > You know, when developing code, it is very tedious to look for meaningful > > errors and warnings in presence of tons of noise like > > warning: deprecated conversion from string constant to ‘char*’ > > Indeed!
Abolutely! :) > > And you know what? It seems in the next version of gcc, this deprecation > > warnings will be turned into errors. > > Python sources already use 'const' keyword freely, so I think it's time to > > add > > constify bits all over the place. > > Still Python sources does not use const at all the places they should. > If that's the future of GCC, then Python 2.X series is going to need > special compiler flags to disable this error. And I did not reviewed > the status of Python 3 I have whole Python as HG repo here, and recently I investigated release25-maint and py3k branches regarding const usage. I can say const is there (more in py3k), but a lot of places needs conversion too. > If you feel confident and have the time, try to build python 3 from > sources using the -Wwrite-strings option for GCC. And if you are > completelly sure that this will be and error in future GCC's, I > believe you should warn about this in Python-Dev list... I'm not confident :), and unfortunately my time is very limited. Also I don't know for sure about gcc, but at least it is their practice to remove deprecated features in a near release. Look e.g. here: http://gcc.gnu.org/gcc-4.2/changes.html """ * The command-line option -fconst-strings, deprecated in previous GCC releases, has been removed. """ > Some time agoo I tried to patch python2.6 so fix the 'const' issue. > But it turned that this were going to introduce heavy source code > compatibility problems in extension modules written for the 2.X > series, so I give up. Here are 'const'-relevant Python issues: http://bugs.python.org/issue2758 http://bugs.python.org/issue1772673 http://bugs.python.org/issue1699259 http://bugs.python.org/issue1866 So maybe let's discuss this topic here, and come to some consensus, and then maybe try to push python-dev again? Kirill. _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
