diff test/goto.c @ 572:388baa7d4bee

more strict errors. Undeclared identifier Goto to function, calling code segement
author kono
date Fri, 13 Jan 2006 01:51:39 +0900
parents 0c256ea2a97e
children 3de2ae36c7e5
line wrap: on
line diff
--- a/test/goto.c	Thu Jan 12 13:56:44 2006 +0900
+++ b/test/goto.c	Fri Jan 13 01:51:39 2006 +0900
@@ -5,20 +5,12 @@
 code a3(int i,code conv());
 code a4(int i,code conv());
 code a5(int i,code conv());
+code a6();
+code a7();
+code a8();
+code a9();
 
-char*
-print_conv(code conv())
-{
-    if(conv==a2) return "a2";
-    if(conv==a3) return "a3";
-    if(conv==a4) return "a4";
-    if(conv==a5) return "a5";
-    if(conv==a6) return "a6";
-    if(conv==a7) return "a7";
-    if(conv==a8) return "a8";
-    if(conv==a9) return "a9";
-    else return "xx";
-}
+char* print_conv(code conv());
 
 code (*exit0)(int);
 void *env;
@@ -85,3 +77,17 @@
     conv = a2;
     goto conv(1,a3);
 }
+
+char*
+print_conv(code conv())
+{
+    if(conv==a2) return "a2";
+    if(conv==a3) return "a3";
+    if(conv==a4) return "a4";
+    if(conv==a5) return "a5";
+    if(conv==a6) return "a6";
+    if(conv==a7) return "a7";
+    if(conv==a8) return "a8";
+    if(conv==a9) return "a9";
+    else return "xx";
+}