[Python-Dev] Re: sre warnings

Gustavo Niemeyer niemeyer at conectiva.com
Tue Jan 20 08:37:13 EST 2004

I'm back to life, after a long and nice vacation. Sorry for taking a
while to answer this.

> I think Martin is using a more-recent version of gcc than most people here.
> Everyone on Windows (MSVC) sees these warnings, though.

I'm using gcc 3.3.2 here.

> > Do you see any others?
> Windows doesn't complain about the ones your compiler complains about; it
> complains about 17 others, listed here (although the line numbers have
> probably changed in the last 3 months <wink>):
> http://mail.python.org/pipermail/python-dev/2003-October/039059.html

Ok.. it should give me an idea about where to look.

> > Suggestions welcome.
> Upgrade to Windows <heh>.

Next one please.. :-)

> Most of those seem to come from lines of the form
>                 SRE_LOC_IS_WORD((int) ptr[-1]) : 0;

Yes, that's what I reported in my first email. IMO, the compiler should
not complain about it, since the char is being casted away.

> when the "unsigned char" expansion of SRE_CHAR is in effect.  I suppose that
> could be repaired by defining SRE_LOC_IS_ALNUM differently depending on how
> SRE_CHAR is defined.

That's an alternative indeed.

> and SRE_CODE is unsigned short or unsigned long, depending on
> Py_UNICODE_WIDE.  This warning is really irritating.  I suppose
> would shut it up, but that's sure ugly.

I'm trying to avoid using something ugly to avoid an ugly warning.
I'll spend some time on it now that I'm back, and relaxed. :-)


Gustavo Niemeyer

More information about the Python-Dev mailing list