J
Joona I Palaste
Consider this C program.
#include <stdio.h>
int main(void) {
printf;("Hello world!\n");
return 0;
}
When we take into account the "as-if" rule, does this mean that the
implementation is allowed to compile this into a program which does
exactly *NOTHING* - not even anything without any effects - just the
standard start-up code and then immediately afterwards an "exit" opcode?
It doesn't even have to link the printf() implementation or store
"Hello world!\n" anywhere?
--
/-- Joona Palaste ([email protected]) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"'It can be easily shown that' means 'I saw a proof of this once (which I didn't
understand) which I can no longer remember'."
- A maths teacher
#include <stdio.h>
int main(void) {
printf;("Hello world!\n");
return 0;
}
When we take into account the "as-if" rule, does this mean that the
implementation is allowed to compile this into a program which does
exactly *NOTHING* - not even anything without any effects - just the
standard start-up code and then immediately afterwards an "exit" opcode?
It doesn't even have to link the printf() implementation or store
"Hello world!\n" anywhere?
--
/-- Joona Palaste ([email protected]) ---------------------------\
| Kingpriest of "The Flying Lemon Tree" G++ FR FW+ M- #108 D+ ADA N+++|
| http://www.helsinki.fi/~palaste W++ B OP+ |
\----------------------------------------- Finland rules! ------------/
"'It can be easily shown that' means 'I saw a proof of this once (which I didn't
understand) which I can no longer remember'."
- A maths teacher