------- Comment #2 from ian at airs dot com 2008-01-18 16:32 -------
When I compile this code with current mainline with -O3 -Wstrict-overflow=3 I
get the following warnings:
Objects/unicodeobject.c: In function unicode_startswith:
Objects/unicodeobject.c:6943: warning: dereferencing type-punned pointer will
break strict-aliasing rules
Objects/unicodeobject.c:6947: warning: dereferencing type-punned pointer will
break strict-aliasing rules
Objects/unicodeobject.c: In function unicode_endswith:
Objects/unicodeobject.c:6989: warning: dereferencing type-punned pointer will
break strict-aliasing rules
Objects/unicodeobject.c:6992: warning: dereferencing type-punned pointer will
break strict-aliasing rules
Objects/unicodeobject.c: In function unicode_expandtabs:
Objects/unicodeobject.c:5719: warning: assuming signed overflow does not occur
when simplifying conditional to constant
Objects/unicodeobject.c:5727: warning: assuming signed overflow does not occur
when simplifying conditional to constant
Objects/unicodeobject.c: In function rsplit:
Objects/unicodeobject.c:368: warning: assuming signed overflow does not occur
when simplifying conditional to constant
Objects/unicodeobject.c: In function PyUnicodeUCS4_Join:
Objects/unicodeobject.c:4659: warning: assuming signed overflow does not occur
when simplifying conditional to constant
Objects/unicodeobject.c: In function PyUnicodeUCS4_Compare:
Objects/unicodeobject.c:5376: warning: assuming signed overflow does not occur
when changing X +- C1 cmp C2 to X cmp C1 +- C2
Objects/unicodeobject.c:5376: warning: assuming signed overflow does not occur
when changing X +- C1 cmp C2 to X cmp C1 +- C2
The code you are talking about seems to be around line 5722, so this seems to
provide the warnings that you are looking for.
So: which compiler are you using? What output do you see?
--
ian at airs dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-01-18 16:32:45
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34843