aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBernardo Innocenti <bernie@develer.com>2004-07-26 03:33:36 +0200
committerBernardo Innocenti <bernie@gcc.gnu.org>2004-07-26 03:33:36 +0200
commitcca8ead2b904e26000eb1582326ad70843515739 (patch)
tree2c323cc3545b18cb0361f9382cb56f7cddeec8d2 /gcc
parent1ad463f4932ebb6224f1155bced2dda6aedd686f (diff)
downloadgcc-cca8ead2b904e26000eb1582326ad70843515739.zip
gcc-cca8ead2b904e26000eb1582326ad70843515739.tar.gz
gcc-cca8ead2b904e26000eb1582326ad70843515739.tar.bz2
gengtype.c (oprintf): Replace xrealloc () with XRESIZEVEC ().
* gengtype.c (oprintf): Replace xrealloc () with XRESIZEVEC (). * gengtype-yacc.y: Likewise. Replace free() with XDELETE (). * c-typeck.c (PUSH_SPELLING): Remove redundant NULL-pointer check on invocation of XRESIZEVEC (). From-SVN: r85177
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/c-typeck.c7
-rw-r--r--gcc/gengtype-yacc.y4
-rw-r--r--gcc/gengtype.c2
4 files changed, 12 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9216813..a44180f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,12 @@
2004-07-26 Bernardo Innocenti <bernie@develer.com>
+ * gengtype.c (oprintf): Replace xrealloc () with XRESIZEVEC ().
+ * gengtype-yacc.y: Likewise. Replace free() with XDELETE ().
+ * c-typeck.c (PUSH_SPELLING): Remove redundant NULL-pointer
+ check on invocation of XRESIZEVEC ().
+
+2004-07-26 Bernardo Innocenti <bernie@develer.com>
+
* c-common.c (disable_builtin_function): Rename variable n to
new_disabled_builtin.
* c-decl.c (duplicate_decls): Rename parameter decl to new_decl.
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 9a41da6..9f88d6f 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -3755,11 +3755,8 @@ static int spelling_size; /* Size of the spelling stack. */
if (depth >= spelling_size) \
{ \
spelling_size += 10; \
- if (spelling_base == 0) \
- spelling_base = XNEWVEC (struct spelling, spelling_size); \
- else \
- spelling_base = XRESIZEVEC (struct spelling, spelling_base, \
- spelling_size); \
+ spelling_base = XRESIZEVEC (struct spelling, spelling_base, \
+ spelling_size); \
RESTORE_SPELLING_DEPTH (depth); \
} \
\
diff --git a/gcc/gengtype-yacc.y b/gcc/gengtype-yacc.y
index 0d64d97..403e23f 100644
--- a/gcc/gengtype-yacc.y
+++ b/gcc/gengtype-yacc.y
@@ -314,9 +314,9 @@ stringseq: STRING
{
size_t l1 = strlen ($1);
size_t l2 = strlen ($2);
- char *s = (char *) xrealloc ((char *)$1, l1 + l2 + 1);
+ char *s = XRESIZEVEC (char, $1, l1 + l2 + 1);
memcpy (s + l1, $2, l2 + 1);
- free ((void *)$2);
+ XDELETE ($2);
$$ = s;
}
;
diff --git a/gcc/gengtype.c b/gcc/gengtype.c
index 441420c..76f39fa 100644
--- a/gcc/gengtype.c
+++ b/gcc/gengtype.c
@@ -1028,7 +1028,7 @@ oprintf (outf_p o, const char *format, ...)
do {
new_len *= 2;
} while (o->bufused + slength >= new_len);
- o->buf = (char *) xrealloc (o->buf, new_len);
+ o->buf = XRESIZEVEC (char, o->buf, new_len);
o->buflength = new_len;
}
memcpy (o->buf + o->bufused, s, slength);