This caused by the complier, not your code.
And if your code is allowed, this will hang up your system.
The complier is very intelligent so it can optimize perfectly your code and detect some basic error, such as (your continuous with no code)
Or maybe this error is caused because of invaild pointers.
But don't use infinite loops - there are valid situations to use them, I am guessing that because this is a simple program, there will probably be no need. It would be pure speculation to say anything else without seeing your code.