[Python-bugs-list] [ python-Bugs-766696 ] gcc-3.3: dereferencing type-punned pointer

SourceForge.net noreply@sourceforge.net
Mon, 07 Jul 2003 02:16:27 -0700


Bugs item #766696, was opened at 2003-07-06 14:04
Message generated for change (Comment added) made by doko
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=766696&group_id=5470

Category: Build
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Matthias Klose (doko)
Assigned to: Nobody/Anonymous (nobody)
Summary: gcc-3.3: dereferencing type-punned pointer

Initial Comment:
Building with gcc-3.3 leads to about 250 warnings

263 dereferencing type-punned pointer will break
strict-aliasing rules 

Include/intobject.h:#define Py_True ((PyObject *)
&_Py_TrueStruct) 

although the test results look good.

Please add -fno-strict-aliasing to the compiler flags,
when compiling with gcc-3.3 or up.


----------------------------------------------------------------------

>Comment By: Matthias Klose (doko)
Date: 2003-07-07 09:16

Message:
Logged In: YES 
user_id=60903

attached. if correct, please apply to the branch as well.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2003-07-07 05:03

Message:
Logged In: YES 
user_id=21627

Can you provide a patch for that?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=766696&group_id=5470