Commit bde3c0c0 by Richard Henderson Committed by Richard Henderson

c-parse.in (yyoverflow): Revert.

        * c-parse.in (yyoverflow): Revert.
        * parse.y (yyoverflow): Revert.

From-SVN: r52794
parent 5276df18
2002-04-26 Richard Henderson <rth@redhat.com>
* c-parse.in (yyoverflow): Revert.
2002-04-26 David Edelsohn <edelsohn@gnu.org> 2002-04-26 David Edelsohn <edelsohn@gnu.org>
Richard Henderson <rth@redhat.com> Richard Henderson <rth@redhat.com>
......
...@@ -61,41 +61,6 @@ end ifobjc ...@@ -61,41 +61,6 @@ end ifobjc
/* Like YYERROR but do call yyerror. */ /* Like YYERROR but do call yyerror. */
#define YYERROR1 { yyerror ("syntax error"); 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 %start program
......
2002-04-26 Richard Henderson <rth@redhat.com> 2002-04-26 Richard Henderson <rth@redhat.com>
* parse.y (yyoverflow): Revert.
2002-04-26 Richard Henderson <rth@redhat.com>
PR c/3581 PR c/3581
* parse.y (string): Remove. Update all uses to use STRING * parse.y (string): Remove. Update all uses to use STRING
instead, and not call combine_strings. instead, and not call combine_strings.
......
...@@ -48,40 +48,6 @@ extern struct obstack permanent_obstack; ...@@ -48,40 +48,6 @@ extern struct obstack permanent_obstack;
/* Like YYERROR but do call yyerror. */ /* Like YYERROR but do call yyerror. */
#define YYERROR1 { yyerror ("syntax error"); 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 OP0(NODE) (TREE_OPERAND (NODE, 0))
#define OP1(NODE) (TREE_OPERAND (NODE, 1)) #define OP1(NODE) (TREE_OPERAND (NODE, 1))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment