Message317853
| Author |
xdegaye |
| Recipients |
cstratak, eitan.adler, martin.panter, miss-islington, pmpp, serhiy.storchaka, siddhesh, vstinner, xdegaye, yan12125, ztane |
| Date |
2018年05月28日.14:23:22 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1527517402.62.0.682650639539.issue33012@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
> Pedantically the correct way is to cast to a function pointer with no prototype (empty parentheses)
Thanks for raising this point Antti. This is hinted at by the gcc 8 documentation on -Wcast-function-type: "The function type void (*) (void) is special and matches everything, which can be used to suppress this warning" [1]. One cannot use empty parentheses though as this raises -Wstrict-prototypes on Python builds with gcc and -Wcast-function-type with gcc 8.
So (void *) may be replaced with (void (*) (void)) in my previous code snippets and also in PR 6748 and PR 6749 (I just checked my code).
[1] https://gcc.gnu.org/onlinedocs/gcc-8.1.0/gcc/Warning-Options.html#Warning-Options |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2018年05月28日 14:23:22 | xdegaye | set | recipients:
+ xdegaye, vstinner, pmpp, martin.panter, serhiy.storchaka, ztane, eitan.adler, siddhesh, yan12125, cstratak, miss-islington |
| 2018年05月28日 14:23:22 | xdegaye | set | messageid: <1527517402.62.0.682650639539.issue33012@psf.upfronthosting.co.za> |
| 2018年05月28日 14:23:22 | xdegaye | link | issue33012 messages |
| 2018年05月28日 14:23:22 | xdegaye | create |
|