[SciPy-dev] mtrand.c compiler warnings

David M. Cooke cookedm at physics.mcmaster.ca
Fri Oct 14 16:37:05 CDT 2005

cookedm at physics.mcmaster.ca (David M. Cooke) writes:

> Robert Kern <rkern at ucsd.edu> writes:
>> Pearu Peterson wrote:
>>> Hi Robert,
>>> Compiling mtrand.c throws lots of compiler warnings. Is it safe to
>>> handedit mtrand.c to fix these warnings? Or should pyrex fixed to get rid 
>>> of these warnings?
>> No, it's not safe to hand-edit mtrand.c . It really shouldn't even be in
>> the repository, but I didn't want to make Pyrex an explicit
>> build-dependency.
>> Pyrex *ought* to be fixed to get rid of these warnings, but no one has
>> really done the leg work to do so. None of the warnings actually matter,
>> though. Does the distutils compiler abstraction easily allow silencing
>> warnings? With gcc, you can just add -w, but people may not be using
>> gcc.
> I've got a patch to Pyrex that fixes a lot of the unused label
> warnings; I'll post it to the Pyrex list, and redo the mtrand.c
> creation.

... and done. I did have to make a postprocessor to clean up the last
few 'assignment from incompatible pointer type' warnings, as fixing
that in Pyrex looks messy. generate_mtrand_c.py runs mtrand.pyx
through pyrexc, and postprocesses it.

|David M. Cooke                      http://arbutus.physics.mcmaster.ca/dmc/
|cookedm at physics.mcmaster.ca

More information about the Scipy-dev mailing list