Howdy, The issue is with newer versions of Clang 2.9 in the past few months when compile time array-bounds checking was added to clang. The array-bounds checking can create false positives under certain circumstances. The way Python defines and allocates its objects is one such situation. The end result are these warnings.
There is an array of pointers (set to a size of 1) in PyTupleObject;s definition, but when PyTuple_New is called memory is allocated to allow the array of 1 to be of a variable size. The compiler thinks it is overwriting the array of 1, but object creation has already set aside extra space at run time. The error can be ignored. If you wish to use clang and use -Warray-bounds and not receive these warnings then gnubgmodule.c can have the PyTuple_SET_ITEM usage modified slightly. An example from gnubgmodule.c that throws warnings: PyTuple_SET_ITEM(b, 0, b0); PyTuple_SET_ITEM(b, 1, b1); Change it to int index = 0; PyTuple_SET_ITEM(b, index, b0); PyTuple_SET_ITEM(b, ++index, b1); After further investigation, we aren't along in running across these -Warray-bounds false positives. -- Michael Petch CApp::Sysware Consulting Ltd. OpenPGP FingerPrint=D81C 6A0D 987E 7DA5 3219 6715 466A 2ACE 5CAE 3304 _______________________________________________ Bug-gnubg mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-gnubg
