在 2021-05-03 20:52, Martin Storsjö 写道:
On Mon, 3 May 2021, Christian Franke wrote:Would plain '... = 0' without cast also work ? IIRC it should since C89 :-)That doesn't work either - clang seems to consider the cast (either implicit or explicit) between a integer or pointer-to-integer and a pointer-to-function as something which isn't a compile time constant, in this context...
`0` itself is required to be a null pointer constant (not just `0`, but also any integer constant expression that equals zero, such as `1+1-2`). There is no cast in-between. [1]
[1] https://gcc.godbolt.org/z/Kv3edeW1j -- Best regards, Liu Hao
OpenPGP_signature
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
