]> git.saurik.com Git - bison.git/commitdiff
* src/complain.c: No longer try to be standalone: use system.h.
authorAkim Demaille <akim@epita.fr>
Thu, 20 Sep 2001 17:08:42 +0000 (17:08 +0000)
committerAkim Demaille <akim@epita.fr>
Thu, 20 Sep 2001 17:08:42 +0000 (17:08 +0000)
Don't assume __STDC__ is defined to 1. Just test if it is defined.
* src/complain.h: Likewise.
* src/reduce.c (useless_nonterminals, inaccessable_symbols):
Remove the unused variable `n'.
From Albert Chin-A-Young.

ChangeLog
THANKS
src/complain.c
src/complain.h
src/reduce.c

index 57013a45a12177ad1238bfbc335351aa4a024bc0..0ddd9b4139861e18b9493887e1e9e2b151977411 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2001-09-20  Akim Demaille  <akim@epita.fr>
+
+       * src/complain.c: No longer try to be standalone: use system.h.
+       Don't assume __STDC__ is defined to 1. Just test if it is defined.
+       * src/complain.h: Likewise.
+       * src/reduce.c (useless_nonterminals, inaccessable_symbols):
+       Remove the unused variable `n'.
+       From Albert Chin-A-Young.
+
 2001-09-18  Marc Autret  <autret_m@epita.fr>
 
        * doc/bison.1: Update.
@@ -15,9 +24,9 @@
        * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
        do that.
        Reported by Keith Browne.
-       
+
 2001-09-18  Marc Autret  <autret_m@epita.fr>
-       
+
        * tests/output.at: Add tests for --defines and --graph.
 
 2001-09-18  Marc Autret  <autret_m@epita.fr>
diff --git a/THANKS b/THANKS
index 3f0c33e4a929c830398d02cd4a786eb6a2827002..04d42d0ed61235d8e45ac08a00e60129ef251f8f 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -2,6 +2,7 @@ Bison was originally written by Robert Corbett.  It would not be what
 it is today without the invaluable help of these people:
 
 Akim Demaille          akim@epita.fr
+Albert Chin-A-Young     china@thewrittenword.com
 Daniel Hagerty         hag@gnu.org
 David J. MacKenzie     djm@gnu.org
 Fabrice Bauzac         noon@cote-dazur.com
index b25f0b2993c364b8448bbb75eb3ad614481cce15..620e726c30bae4cb13fef6b9e117b245894484c5 100644 (file)
 /* Based on error.c and error.h,
    written by David MacKenzie <djm@gnu.ai.mit.edu>.  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
+#include "system.h"
 
 #if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
-# if __STDC__
+# ifdef __STDC__
 #  include <stdarg.h>
 #  define VA_START(args, lastarg) va_start(args, lastarg)
 # else
@@ -119,7 +115,7 @@ int error_one_per_line;
 `--------------------------------*/
 
 void
-#if defined VA_START && __STDC__
+#if defined VA_START && defined __STDC__
 warn (const char *message, ...)
 #else
 warn (message, va_alist)
@@ -171,7 +167,7 @@ warn (message, va_alist)
 `-----------------------------------------------------------*/
 
 void
-#if defined VA_START && __STDC__
+#if defined VA_START && defined __STDC__
 complain (const char *message, ...)
 #else
 complain (message, va_alist)
@@ -221,7 +217,7 @@ complain (message, va_alist)
 `-------------------------------------------------*/
 
 void
-#if defined VA_START && __STDC__
+#if defined VA_START && defined __STDC__
 fatal (const char *message, ...)
 #else
 fatal (message, va_alist)
@@ -259,7 +255,7 @@ fatal (message, va_alist)
 `------------------------------------------------------------------*/
 
 void
-#if defined VA_START && __STDC__
+#if defined VA_START && defined __STDC__
 error (int status, int errnum,
        const char *message, ...)
 #else
index 3642aab3814a8de5f3a6b82c61d1476d54603879..6a973848b8bc46ff150de913a68d3ccbb27b7f8c 100644 (file)
@@ -23,7 +23,7 @@
 extern "C" {
 #endif
 
-#if defined (__STDC__) && __STDC__
+#ifdef __STDC__
 
 /* Informative messages, but we proceed. */
 
index c5be01feab1f43c23c3dfdbade3fff8decb8cf6c..ce295b5b7074c362d1017e2ad28d8e2107c33ed2 100644 (file)
@@ -117,7 +117,7 @@ static void
 useless_nonterminals (void)
 {
   BSet Np, Ns;
-  int i, n;
+  int i;
 
   /* N is set as built.  Np is set being built this iteration. P is
      set of all productions which have a RHS all in N.  */
@@ -140,7 +140,6 @@ useless_nonterminals (void)
      saved to be used when finding useful productions: only
      productions in this set will appear in the final grammar.  */
 
-  n = 0;
   while (1)
     {
       for (i = WORDSIZE (nvars) - 1; i >= 0; i--)
@@ -171,7 +170,7 @@ static void
 inaccessable_symbols (void)
 {
   BSet Vp, Vs, Pp;
-  int i, n;
+  int i;
   short t;
   rule r;
 
@@ -207,7 +206,6 @@ inaccessable_symbols (void)
 
   SETBIT (V, start_symbol);
 
-  n = 0;
   while (1)
     {
       for (i = WORDSIZE (nsyms) - 1; i >= 0; i--)