Keith said:
You'd have to add a declaration for printf and make some other small
tweaks, but as long as you can persuade the compiler to predefine the
"unix" macro it should be doable in one line.
Why a macro? Why can't we just add a 'const int unix = 1;' declaration
into the very same single line?
According to what is written at IOCCC web site, 'unix' was not supposed
to be a macro at all (predefined or not). 'unix' was supposed to be an
implicitly declared automatic variable, implicitly defined as the first
and only variable in 'main'. Due to certain implementation specifics,
the "garbage" value stored in this variable originally was supposed to
be 1 (it was actually the 'argc' value prepared by the system). In other
words, in order to simulate the original idea as closely as possible
we'd have to simply add 'int unix;' right after the opening brace of
'main'. And if it fails to work properly, add an initializer.
BTW, why did the original author put a pair of braces around 'unix' in
'(unix)["have"]+"fun"-0x60'?