c++ - Difference between block and in-line if statement -


in c++ there difference in assembly code generated statement such as:

if (*expr*) { } 

vs.

if (*expr*) return;   

basically want know whether or not delimiting if statement brackets makes difference underlying code generated simple return statement, above.

if there's going 1 statement within block both identical.

if (e) {    stmt; }  if (e) stmt; 

are same. however, when you've more 1 statement executed, it's mandatory wrap them in {}.


Comments