Subject: rev 39 - trunk/phylo

From: [email-masked]
Date: Sun, 23 Nov 2003 18:07:06 -0600

Author: kfogel
Date: 2003-11-23 18:07:03 -0600 (Sun, 23 Nov 2003)
New Revision: 39

Added:
   trunk/phylo/phylo.c.el
Modified:
   trunk/phylo/phylo.c
Log:
GCC has become over-sensitive, make a new compilation error go away:

* phylo/phylo.c: Remove Elisp code, replace with comment pointing to...

* phylo/phylo.c.el: ... this new file.

Modified: trunk/phylo/phylo.c
===================================================================
--- trunk/phylo/phylo.c	2003-01-03 06:08:08 UTC (rev 38)
+++ trunk/phylo/phylo.c	2003-11-24 00:07:03 UTC (rev 39)
@@ -1223,36 +1223,26 @@
 /* &&& request def */
 
 
-/* Elisp code to help add requests.  */
-
-#if 0
-(defun phylo-add-request (request)
-  (interactive "sName of request to add: ")
-  (let ((function (concat request "_request")))
-    (while (string-match "-" function)
-      (aset function (match-beginning 0) ?_))
-
-    (goto-char (point-min))
-    (search-forward "/*&&& request decls */")
-    (beginning-of-line)
-    (insert (format "request_t %s;\n" function))
-
-    (goto-char (point-min))
-    (search-forward "/*&&& request init */")
-    (beginning-of-line)
-    (insert (format "  REQUEST (\"%s\", %s);\n" request function))
-
-    (goto-char (point-min))
-    (search-forward "/* &&& request def */")
-    (backward-page 1)
-    (insert (format "
-/* The %s request.  */
-
-void
-%s (int argc, struct lenstring *argv)
-{
-}
-
-"
-		    request function))))
-#endif
+/* In phylo.c.el there is Elisp code to help add requests.
+ *
+ * That code used to live here, in a '#if 0 ... #endif' block, but
+ * apparently GCC has started paying more attention to the stuff
+ * inside those blocks, because with GCC 3.3.1 I get this compilation
+ * error:
+ *
+ *    cd ~/src/ale/
+ *    make
+ *    cd phylo;    make all
+ *    make[1]: Entering directory `/home/kfogel/src/ale/phylo'
+ *    gcc -c -g -O2 phylo.c
+ *    phylo.c:1248:21: missing terminating " character
+ *    phylo.c:1256:2: missing terminating " character
+ *    make[1]: *** [phylo.o] Error 1
+ *    make[1]: Leaving directory `/home/kfogel/src/ale/phylo'
+ *    make: *** [all] Error 2
+ *    
+ *    Compilation exited abnormally with code 2 at Sun Nov 23 12:36:59
+ *
+ * ... due to GCC apparently trying to eat Elisp code.  Hrmph.  We
+ * told it not to try to eat that code, why did it insist?
+ */

Added: trunk/phylo/phylo.c.el
===================================================================
--- trunk/phylo/phylo.c.el	2003-01-03 06:08:08 UTC (rev 38)
+++ trunk/phylo/phylo.c.el	2003-11-24 00:07:03 UTC (rev 39)
@@ -0,0 +1,31 @@
+;;; Elisp code to help add requests in phylo.c. ;;;
+
+(defun phylo-add-request (request)
+  (interactive "sName of request to add: ")
+  (let ((function (concat request "_request")))
+    (while (string-match "-" function)
+      (aset function (match-beginning 0) ?_))
+
+    (goto-char (point-min))
+    (search-forward "/*&&& request decls */")
+    (beginning-of-line)
+    (insert (format "request_t %s;\n" function))
+
+    (goto-char (point-min))
+    (search-forward "/*&&& request init */")
+    (beginning-of-line)
+    (insert (format "  REQUEST (\"%s\", %s);\n" request function))
+
+    (goto-char (point-min))
+    (search-forward "/* &&& request def */")
+    (backward-page 1)
+    (insert (format "
+/* The %s request.  */
+
+void
+%s (int argc, struct lenstring *argv)
+{
+}
+
+"
+		    request function))))