3 ms·
I'm actually curious how the compilers would handle this. The compiler may inline the gotos so it's really: int init_abc() { if(!init_a())
by cube13 14y ago
I'm actually curious how the compilers would handle this. The compiler may inline the gotos so it's really:
int init_abc()
{
if(!init_a())
return 0;
if(!init_b())
cleanup_a();
return 0;
if(!init_c())
cleanup_a();
cleanup_b();
return 0;
return 1;
}