[issue29674] Use GCC __attribute__((alloc_size(x, y))) on PyMem_Malloc() functions

svelankar report at bugs.python.org
Tue Mar 14 13:22:46 EDT 2017


svelankar added the comment:

Ok. 

As a side note, while compiling python source using gcc 7 [gcc (GCC) 7.0.1 20170314 (experimental)], few places in the code with case fallthrough (must be intentional) triggered this warning - -Wimplicit-fallthrough=.

We can either disable this warning altogether (downside being unintended fallthroughs will go unnoticed) OR  pass some flag [https://developers.redhat.com/blog/2017/03/10/wimplicit-fallthrough-in-gcc-7/] to -Wimplicit-fallthrough=. so that it does a regex match on the comments defined [something like  /* fall through code */] in that specific part of the code and suppresses the warning. The downside to this is that these comments might have to be inserted wherever they are missing and new code introduced in the future with intentional fallthroughs need to write those comments. Please let me know.

----------

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


More information about the Python-bugs-list mailing list