Hacker News new | past | comments | ask | show | jobs | submit login

And without the explicit cast I'm getting:

GCC: error: invalid conversion from 'int' to 'planet'

clang: error: assigning to 'enum planet' from incompatible type 'int'

Yeah, with casts C let's you reinterpret anything as anything else. Similar to `as any` in TypeScipt.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: