5 May
2020
5 May
'20
3:10 a.m.
Hi Gerald,
+ type = 0xdeadbeef; I guess this assignment will work on all compilers. Isn't assigning the value outside of enum range unspecified in C standard? I don't know if it's a valid concern but I'm worried it may still cause a warning on some compilers (I don't know any that actually warns in this case). How about adding a new value to enum and using it in tests for uninitialized value (or just using 0)?
Thanks, Piotr