Add missing case for pointer -> int when translating constant cast expressions

Closes issue #17458
Disallow casting directly between C-like enums and unsafe pointers

This closes issue #17444
Add regression test for issue #17458
Add regression test for issue #17444