[issue4370] warning: unknown conversion type character `z' in format

Roumen Petrov report at bugs.python.org
Wed Nov 26 00:11:33 CET 2008


Roumen Petrov <bugtrack at roumenpetrov.info> added the comment:

Akira Kitada wrote:
> Akira Kitada <akitada at gmail.com> added the comment:
> 
> Roumen,
> Thanks for the feedback!
> 
> This patch disables __attribute__ when PY_FORMAT_SIZE_T isn't defined,
> not always.

I would like to clarify. After patch if PY_FORMAT_SIZE_T isn't defined 
then __attribute__(XXX) will be ignored always irrespective of content, 
i.e. XXX.

> About the name of the macro, I think you are right.
> Py_GCC_FORMAT_ATTRIBUTE would be much better name if it is not used for
> other uses. (I'm not sure)
> I'll look into the code more and if it seems being safe to rename it,
> I'll update the patch and resubmit it.

The current python code use Py_GCC_ATTRIBUTE only for 
'format(printf(...)) ' attribute. The patch will prevent python to use 
this macro in future for other attributer.

Also I'm not sure that I would like warning to be hidden.
As example I know that GCC(mingw) 3.5.x don't support %z and I prefer to 
see those warnings instead to hide them.

Roumen

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4370>
_______________________________________


More information about the Python-bugs-list mailing list