c-parse.in (yyoverflow): Revert.
authorRichard Henderson <rth@redhat.com>
Fri, 26 Apr 2002 17:04:37 +0000 (10:04 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 26 Apr 2002 17:04:37 +0000 (10:04 -0700)
        * c-parse.in (yyoverflow): Revert.
        * parse.y (yyoverflow): Revert.

From-SVN: r52794

gcc/ChangeLog
gcc/c-parse.in
gcc/cp/ChangeLog
gcc/cp/parse.y

index cb84073fbaed22378957cd46e74ecb064e6c7548..8b23b5f8ca4cf41069318c3c49f07e4cd67ca300 100644 (file)
@@ -1,3 +1,7 @@
+2002-04-26  Richard Henderson  <rth@redhat.com>
+
+        * c-parse.in (yyoverflow): Revert.
+
 2002-04-26  David Edelsohn  <edelsohn@gnu.org>
            Richard Henderson  <rth@redhat.com>
 
index f7cc49283b6445a72b247b7c1954b153345b3462..ff279a1007942f4e956b6dba51fc801edfa1f3cf 100644 (file)
@@ -61,41 +61,6 @@ end ifobjc
 
 /* Like YYERROR but do call yyerror.  */
 #define YYERROR1 { yyerror ("syntax error"); YYERROR; }
-
-/* Like the default stack expander, except (1) use realloc when possible,
-   and (2) impose no hard maxiumum on stack size.  */
-#define yyoverflow(MSG, SS, SSSIZE, VS, VSSIZE, YYSSZ)                 \
-do {                                                                   \
-  size_t newsize;                                                      \
-  short *newss;                                                                \
-  YYSTYPE *newvs;                                                      \
-  newsize = *(YYSSZ) *= 2;                                             \
-  if (yyfree_stacks)                                                   \
-    {                                                                  \
-      newss = (short *)                                                        \
-       really_call_realloc (*(SS), newsize * sizeof (short));          \
-      newvs = (YYSTYPE *)                                              \
-       really_call_realloc (*(VS), newsize * sizeof (YYSTYPE));        \
-    }                                                                  \
-  else                                                                 \
-    {                                                                  \
-      newss = (short *) really_call_malloc (newsize * sizeof (short)); \
-      if (newss)                                                       \
-        memcpy (newss, *(SS), (SSSIZE));                               \
-      newvs = (YYSTYPE *) really_call_malloc (newsize * sizeof (YYSTYPE)); \
-      if (newvs)                                                       \
-        memcpy (newvs, *(VS), (VSSIZE));                               \
-    }                                                                  \
-  if (!newss || !newvs)                                                        \
-    {                                                                  \
-      yyerror (MSG);                                                   \
-      return 2;                                                                \
-    }                                                                  \
-  yyfree_stacks = 1;                                                   \
-  *(SS) = newss;                                                       \
-  *(VS) = newvs;                                                       \
-} while (0)
-
 %}
 
 %start program
index 607aa433fdbddd899c7db0f3eaf467970d5eb0ed..e8aa22ae1c90472ad8fe3865d0319f9f7918f16a 100644 (file)
@@ -1,3 +1,7 @@
+2002-04-26  Richard Henderson  <rth@redhat.com>
+
+       * parse.y (yyoverflow): Revert.
+
 2002-04-26  Richard Henderson  <rth@redhat.com>
 
        PR c/3581
index 2d8d0465cfb43b415f4eb27d64cbbdbd35a552c1..0f963619495a188366f07fedd85c5fedf9fa9e1e 100644 (file)
@@ -48,40 +48,6 @@ extern struct obstack permanent_obstack;
 /* Like YYERROR but do call yyerror.  */
 #define YYERROR1 { yyerror ("syntax error"); YYERROR; }
 
-/* Like the default stack expander, except (1) use realloc when possible,
-   and (2) impose no hard maxiumum on stack size.  */
-#define yyoverflow(MSG, SS, SSSIZE, VS, VSSIZE, YYSSZ)                 \
-do {                                                                   \
-  size_t newsize;                                                      \
-  short *newss;                                                                \
-  YYSTYPE *newvs;                                                      \
-  newsize = *(YYSSZ) *= 2;                                             \
-  if (yyfree_stacks)                                                   \
-    {                                                                  \
-      newss = (short *)                                                        \
-       really_call_realloc (*(SS), newsize * sizeof (short));          \
-      newvs = (YYSTYPE *)                                              \
-       really_call_realloc (*(VS), newsize * sizeof (YYSTYPE));        \
-    }                                                                  \
-  else                                                                 \
-    {                                                                  \
-      newss = (short *) really_call_malloc (newsize * sizeof (short)); \
-      if (newss)                                                       \
-        memcpy (newss, *(SS), (SSSIZE));                               \
-      newvs = (YYSTYPE *) really_call_malloc (newsize * sizeof (YYSTYPE)); \
-      if (newvs)                                                       \
-        memcpy (newvs, *(VS), (VSSIZE));                               \
-    }                                                                  \
-  if (!newss || !newvs)                                                        \
-    {                                                                  \
-      yyerror (MSG);                                                   \
-      return 2;                                                                \
-    }                                                                  \
-  yyfree_stacks = 1;                                                   \
-  *(SS) = newss;                                                       \
-  *(VS) = newvs;                                                       \
-} while (0)
-
 #define OP0(NODE) (TREE_OPERAND (NODE, 0))
 #define OP1(NODE) (TREE_OPERAND (NODE, 1))