我发现了 Arthur Whitney 的这部惊人的作品 - http://www.jsoftware.com/jwiki/Essays/Incunabulum
它编译时带有一些警告
$ gcc-4.7 incuna.c -o incuna.o
incuna.c: In function 'ma':
incuna.c:8:15: warning: incompatible implicit declaration of built-in function 'malloc' [enabled by default]
incuna.c: In function 'pi':
incuna.c:26:7: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
incuna.c: In function 'nl':
incuna.c:26:24: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
incuna.c: In function 'pr':
incuna.c:28:10: warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]
incuna.c: In function 'ex':
incuna.c:35:36: warning: assignment makes integer from pointer without a cast [enabled by default]
incuna.c:35:25: warning: return makes pointer from integer without a cast [enabled by default]
incuna.c: In function 'noun':
incuna.c:37:57: warning: return makes integer from pointer without a cast [enabled by default]
incuna.c: In function 'wd':
incuna.c:39:21: warning: incompatible implicit declaration of built-in function 'strlen' [enabled by default]
但它在输入基本输入时出现段错误1 + 1
。
./incuna.o
warning: this program uses gets(), which is unsafe.
1 + 1
[1] 11525 segmentation fault ./incuna.o
我猜这与自 1989 年以来 C 编译器的差异有关。
我怎么能运行这个?我可以在最近的 Linux/Mac 上使用它吗?还是在 VirtualBox VM 上?还是别的什么?
我的谷歌搜索结果没有任何相关。