Robert Bradshaw wrote:
> On May 20, 2009, at 5:49 AM, Dag Sverre Seljebotn wrote:
>
>> I did some digging and decided to share what I found, since this only
>> occurs on a specific compiler and is thus hard to discover.
>>
>> Kurt, pay attention, as I just recommended that you do this :-)
>>
>> Apparently code like this:
>>
>> (foo_struct){0, 0, NULL}
>>
>> is a C99 extension, so we probably shouldn't use it. Furthermore it
>> makes things fail in g++ 4.2.4 (but not in earlier or later versions I
>> tried -- anyway, 4.2.4 is the one currently on sage.math).
>
> I think it's fine in C (not sure if it's just gcc), but has issues
> with C++. We ran into this issue before with cdef optional arguments.
The link I posted lists it as a C99 extension though:
"""
As an extension, GCC supports compound literals in C89 mode and in C++.
"""
http://gcc.gnu.org/onlinedocs/gcc-3.3.1/gcc/Compound-Literals.html
--
Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev