[issue31013] gcc7 throws warning when pymem.h development header is used

2018-02-28 Thread Ned Deily
Change by Ned Deily : -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> [2.7] Fix -Wnonnull and -Wint-in-bool-context warnings ___ Python tracker

[issue31013] gcc7 throws warning when pymem.h development header is used

2018-02-28 Thread Petr Viktorin
Petr Viktorin added the comment: This is a duplicate of https://bugs.python.org/issue31474 which was fixed in https://github.com/python/cpython/pull/3581 It should be included in the next Python 2.7.x release. -- nosy: +encukou ___ Python tracker

[issue31013] gcc7 throws warning when pymem.h development header is used

2017-07-24 Thread Charalampos Stratakis
Changes by Charalampos Stratakis : -- nosy: +cstratak ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue31013] gcc7 throws warning when pymem.h development header is used

2017-07-24 Thread STINNER Victor
STINNER Victor added the comment: > malloc(((argc + 1) * sizeof(char *)) ? ((argc + 1) * sizeof(char *)) : 1)) ) > ); Ah ok, the "(n)?" expression is "((argc + 1) * sizeof(char *)) ? " and yes it contains "*". -- ___ Python tracker

[issue31013] gcc7 throws warning when pymem.h development header is used

2017-07-24 Thread Gabriel Somlo
Gabriel Somlo added the comment: output of "gcc -E -Wall -I/usr/include/python2.7 -c netnsmodule.c > foo.c" I think gcc7 is a bit more paranoid about whether some expression evaluating to an int can/should in itself be used as a Boolean (i.e., without being compared to 0). -- Added fi

[issue31013] gcc7 throws warning when pymem.h development header is used

2017-07-24 Thread STINNER Victor
STINNER Victor added the comment: > /usr/include/python2.7/pymem.h:97:30: error: '*' in boolean context, suggest > '&&' instead [-Werror=int-in-bool-context] I don't understand this error. I would be curious to see the output of the preprocessor. Try maybe to use gcc -E? -- _

[issue31013] gcc7 throws warning when pymem.h development header is used

2017-07-24 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue31013] gcc7 throws warning when pymem.h development header is used

2017-07-24 Thread Gabriel Somlo
Gabriel Somlo added the comment: This attachment illustrates how the problem is triggered. The file is part of the CORE network emulator (github.com/coreemu/core). Compile with "gcc -Wall -I/usr/include/python2.7 -c netnsmodule.c". -- Added file: http://bugs.python.org/file47036/netnsm

[issue31013] gcc7 throws warning when pymem.h development header is used

2017-07-24 Thread Gabriel Somlo
New submission from Gabriel Somlo: C programs using PyMem_MALLOC in pymem.h generate a warning when -Wint-in-bool-context is enabled (typically through -Wall). In places where -Werror is enabled (such as RPM build), this causes the build to fail with an error that looks like: ... In file incl