[Python-Dev] Help with warnings not being raised (original) (raw)

Nick Coghlan ncoghlan at gmail.com
Fri Nov 5 13:55:58 CET 2010


On Fri, Nov 5, 2010 at 11:12 AM, Jesus Cea <jcea at jcea.es> wrote:

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

On 05/11/10 01:36, Benjamin Peterson wrote:

I don't know why.

Are you passing -3 -Wall? I am passing "-3 -Werror", to induce the error control I have committed.

Under -We, PyErr_Warn raises an exception rather than printing to stdout. That exception is clobbered by the immediately following call to PyErr_Clear. Since you only hit that branch under -We in the first place, a second call to PyErr_WriteUnraisable should get the error to actually print out.

Cheers, Nick.

-- Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia



More information about the Python-Dev mailing list