Re: [Cython] 'local variable referenced before assignment' warnings

2011-09-25 Thread Stefan Behnel
Vitja Makarov, 23.09.2011 16:38: 2011/9/23 mark florisson: Can't you run the entire CF analysis after analyse expressions? I think only the code generation needs the cf_* attributes? I'm not sure here. CF solution could be used to improve type inference in the future. Yes, CF analysis should

Re: [Cython] 'local variable referenced before assignment' warnings

2011-09-24 Thread Robert Bradshaw
On Sat, Sep 24, 2011 at 1:08 AM, Vitja Makarov wrote: > 2011/9/23 mark florisson : >> On 23 September 2011 06:02, Robert Bradshaw >> wrote: >>> On Thu, Sep 22, 2011 at 9:36 PM, Vitja Makarov >>> wrote: 2011/9/23 Robert Bradshaw : > On Thu, Sep 22, 2011 at 5:08 AM, Vitja Makarov >

Re: [Cython] 'local variable referenced before assignment' warnings

2011-09-24 Thread Vitja Makarov
2011/9/23 mark florisson : > On 23 September 2011 06:02, Robert Bradshaw > wrote: >> On Thu, Sep 22, 2011 at 9:36 PM, Vitja Makarov >> wrote: >>> 2011/9/23 Robert Bradshaw : On Thu, Sep 22, 2011 at 5:08 AM, Vitja Makarov wrote: > 2011/9/22 Robert Bradshaw : >> On Wed, Sep 21,

Re: [Cython] 'local variable referenced before assignment' warnings

2011-09-23 Thread mark florisson
On 23 September 2011 06:02, Robert Bradshaw wrote: > On Thu, Sep 22, 2011 at 9:36 PM, Vitja Makarov > wrote: >> 2011/9/23 Robert Bradshaw : >>> On Thu, Sep 22, 2011 at 5:08 AM, Vitja Makarov >>> wrote: 2011/9/22 Robert Bradshaw : > On Wed, Sep 21, 2011 at 1:20 AM,   wrote: >> Hi R

Re: [Cython] 'local variable referenced before assignment' warnings

2011-09-23 Thread Vitja Makarov
2011/9/23 mark florisson : > On 23 September 2011 06:02, Robert Bradshaw > wrote: >> On Thu, Sep 22, 2011 at 9:36 PM, Vitja Makarov >> wrote: >>> 2011/9/23 Robert Bradshaw : On Thu, Sep 22, 2011 at 5:08 AM, Vitja Makarov wrote: > 2011/9/22 Robert Bradshaw : >> On Wed, Sep 21,

Re: [Cython] 'local variable referenced before assignment' warnings

2011-09-23 Thread mark florisson
On 23 September 2011 06:02, Robert Bradshaw wrote: > On Thu, Sep 22, 2011 at 9:36 PM, Vitja Makarov > wrote: >> 2011/9/23 Robert Bradshaw : >>> On Thu, Sep 22, 2011 at 5:08 AM, Vitja Makarov >>> wrote: 2011/9/22 Robert Bradshaw : > On Wed, Sep 21, 2011 at 1:20 AM,   wrote: >> Hi R

Re: [Cython] 'local variable referenced before assignment' warnings

2011-09-22 Thread Robert Bradshaw
On Thu, Sep 22, 2011 at 9:36 PM, Vitja Makarov wrote: > 2011/9/23 Robert Bradshaw : >> On Thu, Sep 22, 2011 at 5:08 AM, Vitja Makarov >> wrote: >>> 2011/9/22 Robert Bradshaw : On Wed, Sep 21, 2011 at 1:20 AM,   wrote: > Hi Robert, > > Robert Bradshaw wrote: >> >> The war

Re: [Cython] 'local variable referenced before assignment' warnings

2011-09-22 Thread Vitja Makarov
2011/9/23 Robert Bradshaw : > On Thu, Sep 22, 2011 at 5:08 AM, Vitja Makarov > wrote: >> 2011/9/22 Robert Bradshaw : >>> On Wed, Sep 21, 2011 at 1:20 AM,   wrote: Hi Robert, Robert Bradshaw wrote: > > The warning seem correct to me, or is foo actually modifying the > va

Re: [Cython] 'local variable referenced before assignment' warnings

2011-09-22 Thread Robert Bradshaw
On Thu, Sep 22, 2011 at 5:08 AM, Vitja Makarov wrote: > 2011/9/22 Robert Bradshaw : >> On Wed, Sep 21, 2011 at 1:20 AM,   wrote: >>> Hi Robert, >>> >>> Robert Bradshaw wrote: The warning seem correct to me, or is foo actually modifying the values of cya and cyb? (I suppose this coul

Re: [Cython] 'local variable referenced before assignment' warnings

2011-09-22 Thread Vitja Makarov
2011/9/22 Robert Bradshaw : > On Wed, Sep 21, 2011 at 1:20 AM,   wrote: >> Hi Robert, >> >> Robert Bradshaw wrote: >>> >>> The warning seem correct to me, or is foo actually modifying the >>> values of cya and cyb? (I suppose this could be possible by taking the >>> address of the "passed by refere

Re: [Cython] 'local variable referenced before assignment' warnings

2011-09-21 Thread Robert Bradshaw
On Wed, Sep 21, 2011 at 1:20 AM, wrote: > Hi Robert, > > Robert Bradshaw wrote: >> >> The warning seem correct to me, or is foo actually modifying the >> values of cya and cyb? (I suppose this could be possible by taking the >> address of the "passed by reference" arguments, but would seem like a

Re: [Cython] 'local variable referenced before assignment' warnings

2011-09-21 Thread robert . rex
Hi Robert, Robert Bradshaw wrote: The warning seem correct to me, or is foo actually modifying the values of cya and cyb? (I suppose this could be possible by taking the address of the "passed by reference" arguments, but would seem like a *very* poor API design.) thanks for your fast answer!

Re: [Cython] 'local variable referenced before assignment' warnings

2011-09-21 Thread Robert Bradshaw
On Wed, Sep 21, 2011 at 12:32 AM, wrote: > Hi, > > I got a (misleading) Cython warning from the following code example: > > > cdef extern from "": >    void foo(int &a, int &b) > > cdef cyfoo(): >    cdef int cya, cyb >    foo(cya, cyb) > -

[Cython] 'local variable referenced before assignment' warnings

2011-09-21 Thread robert . rex
Hi, I got a (misleading) Cython warning from the following code example: cdef extern from "": void foo(int &a, int &b) cdef cyfoo(): cdef int cya, cyb foo(cya, cyb) Executing "cython --cplus" produced these messages: