diff options
Diffstat (limited to 'sos-code-article2/sos')
-rw-r--r-- | sos-code-article2/sos/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sos-code-article2/sos/main.c b/sos-code-article2/sos/main.c index 9d897b0..1f91c22 100644 --- a/sos-code-article2/sos/main.c +++ b/sos-code-article2/sos/main.c @@ -133,12 +133,12 @@ void sos_main(unsigned long magic, unsigned long addr) compiling with -O3: "i=1/0;" is considered dead code with gcc -O3. */ i = 10; - while (1) - { /* Stupid function call to fool gcc optimizations */ sos_bochs_printf("i = 1 / %d...\n", i); i = 1 / i; - } + sos_bochs_printf("i = 1 / %d...\n", i); + i = 1 / i; + sos_bochs_printf("i = 1 / %d...\n", i); /* Will never print this since the "divide by zero" exception always returns to the faulting instruction (see Intel x86 doc vol 3, |