3 ms·
If I reformat this, { int val; if (getFoo(&val)) { } printf("%d", val); } The bug is still possible, as you've i
by maccard 2y ago
If I reformat this,
{
int val;
if (getFoo(&val)) {
}
printf("%d", val);
}
The bug is still possible, as you've introduced an extra scope that doesn't exist in the C++ version.
Also, this was one example. There are plenty of other examples.