diff options
author | Jeffrey A Law <law@cygnus.com> | 1998-12-26 09:31:42 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1998-12-26 02:31:42 -0700 |
commit | ba476f7531bee5b2f940f970c3a850ea9a86fa30 (patch) | |
tree | 1ef42433c2078c368e91375f24eaeadda253d631 | |
parent | 7ce1e6c85df96e452a23995b26319bf88f454f50 (diff) | |
download | gcc-ba476f7531bee5b2f940f970c3a850ea9a86fa30.zip gcc-ba476f7531bee5b2f940f970c3a850ea9a86fa30.tar.gz gcc-ba476f7531bee5b2f940f970c3a850ea9a86fa30.tar.bz2 |
gengenrtl.c (gencode): Always use bzero to clear memory instead of dangerous casts and stores.
* gengenrtl.c (gencode): Always use bzero to clear memory instead
of dangerous casts and stores.
Fixes alpha & sparc -O3 bootstrap problems.
From-SVN: r24420
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/gengenrtl.c | 7 |
2 files changed, 4 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index be77325..74c156b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ Sat Dec 26 09:17:04 1998 Jeffrey A Law (law@cygnus.com) + * gengenrtl.c (gencode): Always use bzero to clear memory instead + of dangerous casts and stores. + * Makefile.in (compare, gnucompare): Add missing else true clauses. Fri Dec 25 23:00:56 1998 Jeffrey A Law (law@cygnus.com) diff --git a/gcc/gengenrtl.c b/gcc/gengenrtl.c index e99cb72..b9455cb 100644 --- a/gcc/gengenrtl.c +++ b/gcc/gengenrtl.c @@ -268,12 +268,7 @@ gencode (f) fputs ("static rtx obstack_alloc_rtx (length)\n", f); fputs (" register int length;\n{\n", f); fputs (" rtx rt = (rtx) obstack_alloc (rtl_obstack, length);\n\n", f); - fputs (" if (sizeof(struct rtx_def) - sizeof(rtunion) == sizeof(int))\n", f); - fputs (" *(int *)rt = 0;\n", f); - fputs (" else if (sizeof(struct rtx_def) - sizeof(rtunion) == sizeof(HOST_WIDE_INT))\n", f); - fputs (" *(HOST_WIDE_INT *)rt = 0;\n", f); - fputs (" else\n", f); - fputs (" bzero((char *) rt, sizeof(struct rtx_def) - sizeof(rtunion));\n\n", f); + fputs (" bzero((char *) rt, sizeof(struct rtx_def) - sizeof(rtunion));\n\n", f); fputs (" return rt;\n}\n\n", f); for (fmt = formats; *fmt; ++fmt) |