[Pyrex] lvalue cast problem against GCC 4.0 in 0.9.3.1

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Sep 20 05:16:02 CEST 2005


Lorenzo Mancini wrote:
> I found another lvalue cast problem with Pyrex 0.9.3.1 vs GCC 4.0.
> 
> This patch fixes my instance of the problem.
> 
> --- ExprNodes.py        2005-09-19 18:56:25.000000000 +0200
> +++ ExprNodes.py        2005-09-19 18:59:44.000000000 +0200
> @@ -1588,7 +1588,7 @@
>      def select_code(self):
>          code = self.uncast_select_code()
>          if self.type.is_extension_type:
> -            code = "((PyObject *)%s)" % code
> +            code = "(%s)" % code
>          return code

Unfortunately, it will also un-fix may non-instances of
the problem! The cast you removed is there for a reason.

As I've said, fixing this properly is non-trivial, and
will require some re-thinking of the code generation
strategy.

-- 
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg.ewing at canterbury.ac.nz	   +--------------------------------------+



More information about the Pyrex mailing list