Page 194 - C-Language
P. 194
fprintf(stderr,"something's wrong\n");
goto CLEANUP2; /* Free a and close b to prevent leaks */
}
/* do yet something else */
CLEANUP2:
close(b);
CLEANUP1:
free(a);
}
Labels such as CLEANUP1 and CLEANUP2 are special identifiers that behave differently from all other
identifiers. They are visible from everywhere inside the function, even in places that are executed
before the labeled statement, or even in places that could never be reached if none of the goto is
executed. Labels are often written in lower-case rather than upper-case.
Read Identifier Scope online: https://riptutorial.com/c/topic/1804/identifier-scope
https://riptutorial.com/ 170

