bug-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bison-1.30 build failure with K&R C compiler


From: Akim Demaille
Subject: Re: bison-1.30 build failure with K&R C compiler
Date: 18 Dec 2001 10:27:27 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Civil Service)

>>>>> "Nelson" == Nelson H F Beebe <address@hidden> writes:

Nelson> An attempt to build bison-1.30 on an HP-UX 10.01 system that
Nelson> only has an old K&R-style C compiler failed.

Yet another great K&R limitation :(

Thanks Nelson!  Glad to see you here too :)

I'm applying the following patch, and wrap another beta.  May I ask
you to try it once it's published?  Thanks!

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        Some host fail on `assert (!"foo")', which expands to
        ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
        Reported by Nelson Beebee.

        * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
        `#define it_succeeded 0' and `assert (it_succeeded)'.

Index: THANKS
===================================================================
RCS file: /cvsroot/bison/bison/THANKS,v
retrieving revision 1.10.2.16
diff -u -u -r1.10.2.16 THANKS
--- THANKS 15 Dec 2001 11:07:56 -0000 1.10.2.16
+++ THANKS 18 Dec 2001 09:31:55 -0000
@@ -19,6 +19,7 @@
 Laurent Mascherpa       address@hidden
 Marc Autret             address@hidden
 Neil Booth              address@hidden
+Nelson H. F. Beebe      address@hidden
 Noah Friedman           address@hidden
 Pascal Bart             address@hidden
 Paul Eggert             address@hidden
Index: src/output.c
===================================================================
RCS file: /cvsroot/bison/bison/src/output.c,v
retrieving revision 1.39.2.19
diff -u -u -r1.39.2.19 output.c
--- src/output.c 17 Dec 2001 18:45:59 -0000 1.39.2.19
+++ src/output.c 18 Dec 2001 09:31:55 -0000
@@ -978,8 +978,8 @@
          return j;
        }
     }
-
-  assert (!"pack_vector");
+#define pack_vector_succeeded 0
+  assert (pack_vector_succeeded);
   return 0;
 }
 
Index: src/vcg.c
===================================================================
RCS file: /cvsroot/bison/bison/src/vcg.c,v
retrieving revision 1.5.2.7
diff -u -u -r1.5.2.7 vcg.c
--- src/vcg.c 19 Nov 2001 09:13:40 -0000 1.5.2.7
+++ src/vcg.c 18 Dec 2001 09:31:56 -0000
@@ -242,7 +242,8 @@
     case orchid:       return "orchid";
     case black:                return "black";
     default:
-      assert (!"Not a default color.");
+#define A_known_default_color 0
+      assert (A_known_default_color);
     }
   return NULL;
 }
@@ -256,7 +257,8 @@
     case left_justify: return "left_justify";
     case right_justify:        return "right_justify";
     default:
-      assert (!"Not a text mode.");
+#define A_known_text_mode 0
+      assert (A_known_text_mode);
     }
   return NULL;
 }
@@ -271,7 +273,8 @@
     case ellipse:      return "ellipse";
     case triangle:     return "triangle";
     default:
-      assert (!"Not a shape.");
+#define A_known_shape 0
+      assert (A_known_shape);
     }
   return NULL;
 }
@@ -296,7 +299,8 @@
     case dfs:          return "dfs";
     case tree:         return "tree";
     default:
-      assert (!"Not a layout algorithm.");
+#define A_known_layout_algorithm 0
+      assert (A_known_layout_algorithm);
     }
   return NULL;
 }
@@ -309,7 +313,8 @@
     case no:   return "no";
     case yes:  return "yes";
     default:
-      assert (!"Either yes nor no.");
+#define Either_yes_nor_no 0
+      assert (Either_yes_nor_no);
     }
   return NULL;
 }
@@ -324,7 +329,8 @@
     case left_to_right: return "left_to_right";
     case right_to_left: return "right_to_left";
     default:
-      assert (!"Not an orientation.");
+#define A_knownn_orientation 0
+      assert (A_knownn_orientation);
     }
   return NULL;
 }
@@ -338,7 +344,8 @@
     case top:          return "top";
     case bottom:       return "bottom";
     default:
-      assert (!"Not an alignement.");
+#define A_known_alignement 0
+      assert (A_known_alignement);
     }
   return NULL;
 }
@@ -351,7 +358,8 @@
     case fixed:                return "fixed";
     case free_a:       return "free";
     default:
-      assert (!"Not an arrow mode.");
+#define A_known_arrow_mode 0
+      assert (A_known_arrow_mode);
     }
   return NULL;
 }
@@ -366,7 +374,8 @@
     case barymedian:   return "barymedian";
     case medianbary:   return "medianbary";
     default:
-      assert (!"Not a crossing type.");
+#define A_known_crossing_type 0
+      assert (A_known_crossing_type);
     }
   return NULL;
 }
@@ -382,7 +391,8 @@
     case fcfish:       return "fcfish";
     case fpfish:       return "fpfish";
     default:
-      assert (!"Not a view.");
+#define A_known_view 0
+      assert (A_known_view);
     }
   return NULL;
 }
@@ -397,7 +407,8 @@
     case dotted:       return "dotted";
     case invisible:    return "invisible";
     default:
-      assert (!"Not a line style.");
+#define A_known_line_style 0
+      assert (A_known_line_style);
     }
   return NULL;
 }
@@ -411,7 +422,8 @@
     case line: return "line";
     case none: return "none";
     default:
-      assert (!"Not an arrow style.");
+#define A_known_arrow_style 0
+      assert (A_known_arrow_style);
     }
   return NULL;
 }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]