As the matter of fact, ... The equivalent to GOTO statement is used frequently by compiler. For what? Unconditional jump instruction
Timing of using GOTOLet function from multiple exit to only oneexit
Reason of using GOTOUnconditional statements are easier tounderstand and follownested is reduced!!!errors by not updating individual exit pointswhen making modiﬁcations are preventedsaves the compiler work to optimizeredundant code away ;)
Don’t use macro in these cases 2. macros that depend on having a local variable with a magic name might look like a good thing, but its confusing as hell when one reads the code and its prone to breakage from seemingly innocent changes.
Don’t use macro in these cases Example for 2: #deﬁne FOO(val) bar(index, val)
Don’t use macro in these cases 3. macros with arguments that are used as l-values Ex: FOO(x) = y; will bite you if somebody e.g. turns FOO into an inline function
Don’t use macro in these cases 4. forgetting about precedence macros deﬁning constants using expressions must enclose the expression in parentheses. Beware of similar issues with macros using parameters.
EVIL! EVIL! EVIL!It hides the real type of the variableAllows programmers to get into trouble large struct. on the stack large struct. passed as return valueCan hid e long structure deﬁnition pick a better nametypedef just signify a pointer type could you be lazier?
Well, mostly...Base system types list_t u8, u16, u64Function pointer
No #ifdef in .c ﬁles#ifdef belongs in .h ﬁleLet your compiler do its work