For unknown reasons, someone asked me if had a copy of this file today. I didn't, but I remembered it was in dmr's home directory, and asked a friend there to find it. I remembered correctly. I don't know why it was touched in 1993, but the .v (mips object file) was created in late 1992. I leave the significance of that date as an exercise for the reader.

By the way, sizeof(void) is illegal, so I'm unsure how it was compiled; my friend assures me the compilers from then didn't accept it either.

Because G+ refuses to leave the indentation alone and screws up the ls formatting, I'm posting a screen grab here, but i'll include the source code, poorly formatted and rudely scrubbed of indentation, so you can play with the bytes. Just for fun, after the first screen grab I'll post a second screen grab of this post in edit mode before I hit save.


#include <u.h>
#include <libc.h>

typedef int ☺☹☻;
typedef void ☹☺☻;
enum
{
☹☻☺ = sizeof(☺☹☻),
☻☺☹ = sizeof(☹☺☻),
};

☹☺☻
main(☹☺☻)
{
☺☹☻ ☺☻☹;

for(☺☻☹=☻☺☹; ☺☻☹<☹☻☺; ☺☻☹++)
print("☺☻☹ = %d\n", ☺☻☹);
exits(☻☺☹);
}
Photo
Photo
2 Photos - View album
Shared publiclyView activity