On Feb 25, 2009, at 5:36 AM, Lisandro Dalcin wrote: > On Wed, Feb 25, 2009 at 5:34 AM, Stefan Behnel > <[email protected]> wrote: >> >> Lisandro Dalcin wrote: >>> After GCC-compiling mpi4py with flags '-std=c89 -pedantic >>> -Wno-long-long', I've got a bunch of warnings like this: >>> >>> warning: initializer element is not computable at load time >>> >>> After googling a bit to understand the issue, I wrote the attached >>> patch. Please review and apply if it is OK. >> >> Would it work to write this kind of code: >> >> PyObject* values[N] = {0,0,...,0}; // all 0! >> values[3] = non_NULL_default_value3; >> values[8] = non_NULL_default_value8; >> > > Yes, it would work ... > >> instead of setting /all/ values separately? I would like to avoid >> unnecessary code here, but seeing the default values directly >> could even >> make things more readable.
I would assume the compiler optimizes the statement to be as good as before? - Robert _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
