Lisandro Dalcin wrote:

> On Tue, Oct 6, 2009 at 5:45 AM, Robert Bradshaw
> <rober...@math.washington.edu> wrote:
>> On Oct 5, 2009, at 1:18 PM, Lisandro Dalcin wrote:
>>
>>> Well, I'm hacking on supporting C++ complex, but have some questions
>>>
>>> Robert: why did you bothered about using 'infix' operators instead of
>>> using macros when c99 complex is on? Just to generate more readable C
>>> code? Could this be changed to always use the macros?
>>
>> Yep, that's probably why. Is there an advantage to always using the
>> macros.
>>
> 
> Was that a question? Then I think yes, we could potentially select at
> C compile type the kind of complex numbers to use. For this to be
> possible, the rest of the code has to be identical...Well, this would
> require to always promote int/float to complexes, but for C99/C++ that
> can also be done with a macro (no need at all of using a inline
> function as currently)
> 
>>
>> So, there's really three types of complex numbers:
>>
>> - Native (struct-based)
>> - c99 (valid for C)
>> - c++ (valid for C++)
>>
> 
> Yes, but C99 complexes could be used in C++ (for example, IBM
> compilers seems to let you use C99 complexes in C++, look at the very
> end of:
> 
http://publib.boulder.ibm.com/infocenter/comphelp/v7v91/index.jsp?topic=/com.ibm.vacpp7a.doc/language/ref/clrc03complex_types.htm)
> 
I'm pretty sure gcc won't allow this.

_______________________________________________
Cython-dev mailing list
Cython-dev@codespeak.net
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to