GATE / CS ARCHIVE

GATE CSE 1994 / QUESTION 1.5

Why unrestricted goto is discouraged

Compiler Design · Other / Mixed Topics · Full GATE CSE 1994 paper

GATE 1994, Q1.5 MCQ
Not in GATE 2027 syllabusReport issue

Other / Mixed Topics

Question 1.5, GATE 1994: Is unrestricted goto harmful because verification is harder, runtime rises, memory rises, or generated code is necessarily longer?
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

Arbitrary jumps can create tangled control flow with many entry points and difficult-to-track invariants. This makes local reasoning about a block’s preconditions and postconditions harder, so program verification and maintenance suffer. A jump itself need not increase runtime, data storage or machine-code length; those effects depend on the program and compiler. The objection is therefore structural reasoning, not a universal performance penalty. Structured conditionals and loops make control-flow boundaries more explicit.

Original paper, page 1