Can optimizing compiler delete infinite loops, which does not changes any data, like
while(1)
/* noop */;
From analyzing a data flow graph compiler can derive, that such loop is "dead code" without any side effects.
Is deleting of infinite loops prohibited by C90/C99 standards?
Does C90 or C99 standards permit compiler to deleting such loops?
Upd: "Microsoft C version 6.0 did essentially this optimization.", see link by caf.
label: goto label;
return 0;
will be transformed to
return 0;