In my code, if an error is encountered, an error function is called that holds the program in a loop until it receives one of two inputs. One continues where it left off, and the other is supposed to restart the program.

Will using goto within a function cause problems? I'm thinking that if it compiles as a jump instruction won't it pop the stack. Unless the compiler takes care of it. All. If it is a problem, can I manually modify the return address so that on return the function jumps to the main loop?

Nested loops are usually the result of poor design.Would something allong the lines of a state machine work for you?Essentially you'd be using the main loop for your nested loops...Should help with debugging aswell, since you know the exact order in which your program runs, and can put in debug messages accordingly.

There are some specific use-cases where the judicious application of goto results in faster, more readable (and hence more maintainable) and less error-prone code.

Device-driver code that sequentially allocates resources before performing actions, where failure to allocate a resource requires the de-allocation in the reverse order is one example. Using nested "if" statements in this case pushes the main code path deep into the nesting, obfuscating the code's function.

Goto has a place in the language, but it's definitely an advanced technique that should be considered only with strong justification.

The goto keyword is seen as gauche in a higher-level language, but it's really not so bad as all that. There are cases where it improves readability. There's no technical difference between goto in C and a jump instruction in the assembler, except for the implications on other control structures like loops and functions.