[issue3326] py3k shouldn't use -fno-strict-aliasing anymore

Daniel Stutzbach report at bugs.python.org
Mon Mar 30 20:09:48 CEST 2009


Daniel Stutzbach <daniel at stutzbachenterprises.com> added the comment:

I'm using gcc 3.4.4 (cygwin) and I get the sames warnings as Alexandre.

I examined a random sampling of the code generating the warnings, all of
which followed this pattern:

    some_function((some_type **) &var_of_some_other_type);

Since the variable isn't actually being dereferenced in the calling
function, the code isn't violating the strict aliasing rules.  I guess
gcc 4.3 is smart enough to suppress the warning in cases like this.

We could make the warning go away by replacing "(some_type **)" with
"(void *)", though that perhaps decreases readability.  Alternately we
can just disregard the warnings on older versions of gcc.

----------
nosy: +stutzbach
versions: +Python 3.1

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3326>
_______________________________________


More information about the Python-bugs-list mailing list