diff options
author | Richard Henderson <rth@redhat.com> | 2002-04-26 10:04:37 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2002-04-26 10:04:37 -0700 |
commit | bde3c0c07d7d1d92644aef53c91735234e8330ec (patch) | |
tree | 7cf30765ef4a2b66b363199785d8e7f3112f845d /gcc | |
parent | 5276df1857226e7309b25a002daed2d8ef90802d (diff) | |
download | gcc-bde3c0c07d7d1d92644aef53c91735234e8330ec.zip gcc-bde3c0c07d7d1d92644aef53c91735234e8330ec.tar.gz gcc-bde3c0c07d7d1d92644aef53c91735234e8330ec.tar.bz2 |
c-parse.in (yyoverflow): Revert.
* c-parse.in (yyoverflow): Revert.
* parse.y (yyoverflow): Revert.
From-SVN: r52794
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/c-parse.in | 35 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/parse.y | 34 |
4 files changed, 8 insertions, 69 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index cb84073..8b23b5f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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> diff --git a/gcc/c-parse.in b/gcc/c-parse.in index f7cc492..ff279a1 100644 --- a/gcc/c-parse.in +++ b/gcc/c-parse.in @@ -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 diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 607aa43..e8aa22a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2002-04-26 Richard Henderson <rth@redhat.com> + * parse.y (yyoverflow): Revert. + +2002-04-26 Richard Henderson <rth@redhat.com> + PR c/3581 * parse.y (string): Remove. Update all uses to use STRING instead, and not call combine_strings. diff --git a/gcc/cp/parse.y b/gcc/cp/parse.y index 2d8d046..0f96361 100644 --- a/gcc/cp/parse.y +++ b/gcc/cp/parse.y @@ -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)) |