I wrote a patch for the GCC trunk to add an __attribute__((format(PyArg_ParseTuple, 2, 3))) declaration to functions (this specific declaration should go to PyArg_ParseTuple only). With that patch, parameter types are compared with the string parameter (if that's a literal), and errors are reported if there is a type mismatch (provided -Wformat is given). I'll post more about this patch in the near future, and commit some bug fixes I found with it, but here is the patch, in a publish-early fashion. There is little chance that this can go into GCC (as it is too specific), so it likely needs to be maintained separately. It was written for the current trunk, but hopefully applies to most recent releases. Regards, Martin -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: pyformat.diff Url: http://mail.python.org/pipermail/python-dev/attachments/20060922/588484ab/attachment-0001.diff
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4