Show Navigation
Conversation
Notices
-
the dereference is only apparent. sizeof doesn't execute its operand, only the type of the expression matters, and types and sizes are static in C, so it's all right. the most debatable point IMHO is that the variable is already in scope before it's initialized, but that's quite useful to initialize e.g. circular list, or one member pointing to another, so... it's all right, really. there's room for shooting your own feet, but C has never even tried to prevent that if that's what you wish to do, or even if it isn't ;-)