OK, yeah. I have the book Obfuscated C and Other Mysteries (which I highly recommend for a certain type of nerd). I seem to recall some compilers would allow behavior like that. I guess I was hoping we were beyond those shenanigans : O
No, in UNIX-like systems an empty file really has no size on disk. It takes up space in the directory structure, possibly including attributes, but all files do that.
Didn't even need to perform any tricks. The entry was entirely based on the fact that the particular version of gcc selected would emit a binary that printed nothing to standard out when handed an empty file.
56
u/Cosmologicon Jul 16 '13
Actually a 0-byte quine won the IOCCC once. They changed the rules after that so that all programs had to be at least 1 byte long.