From 1f306dad844a8feefbafbaffae664a89f12a00c4 Mon Sep 17 00:00:00 2001
From: Landon Curt Noll
Enter an expression on standard input. To try some we have selected:
./try.sh
At a time the code in fanf.c was that of fanf.orig.c -but to get this to compile in modern systems it had to be translated to what you -now see. The intermediate steps can still be performed but they might be -different from the past. This should be kept in mind as you read the below -remarks.
This program translates lambda expressions into combinator expressions. But you do not need to know Lambda Calculus to be impressed by this program!
diff --git a/thanks-for-help.html b/thanks-for-help.html index 27ed5b5a5..b9a6bb6be 100644 --- a/thanks-for-help.html +++ b/thanks-for-help.html @@ -2632,18 +2632,28 @@ for more details.Cody fixed this to compile. The problem was the intermediate steps to get to the -final code that is compiled. The code is now what it essentially becomes when -processed completely. The intermediate steps can now be performed to see how it -expands but it can still compile and be used.
-Cody also added a second arg to main() out of an abundance of caution as some
-versions of clang complain about the number of args to main(). These versions
-claim that only 0, 2 or 3 are allowed but it does allow 1 anyway. It is quite
-possible though that this will change so it is fixed in case this happens. As it
-is mostly just through the C pre-processor Cody added a new macro to make the
-code look like the original with just an extra arg. See the
-FAQ on “main function args”
-for more details.
Cody fixed this to compile. Tony Finch fixed it again to be +more like the original submission. The double preprocessing is a joke +about C and a joke about OFL so the program is less funny without it.
+There were a couple of problems with the double preprocessing that +upset modern compilers:
+Recent versions of gcc wrap #line marks around the expansion
+of EOF which broke up #define ef E(EOF) across multiple lines.
+This can be avoided by processing #include in the second
+preprocessor phase.
(Tony vaguely remembers some indecision about when to #include,
+in particular whether preprocessing the headers twice would lead
+to trouble. Early #include seemed to work and was shorter so
+that was what the original submission did.)
System headers can be sensitive to compiler options, for example
+restrict keywords might be omitted when compiling with
+-std=gnu90. Consistency options need to be used at all stages.
Cody also added a second arg to main(). Tony removed both args since
+neither of them are used and it’s shorter that way (though it provokes
+a warning about a non-prototype function definition). See the FAQ on
+“main function args” for more details.
In some versions of clang -Wno-int-conversion had to be added to the
CSILENCE variable of the Makefile.
Cody also added the try.sh script to show the output of some