|
|
On 4/17/2012 3:16, Invisible wrote:
> It gives you warnings if code is unreachable.
It gives you warnings if it thinks the code is unreachable. It gives you an
error and won't let it compile if it can prove you have unreachable code.
{ int x = 0; return; x = 1; } // Gives an error.
{ int x = 0; if (true) return; x = 2; } // gives a warning.
> It even complains if you have a void function that uses return just to exit
> early, and there's nothing afterwards...)
I didn't run into that.
--
Darren New, San Diego CA, USA (PST)
"Oh no! We're out of code juice!"
"Don't panic. There's beans and filters
in the cabinet."
Post a reply to this message
|
|