diff options
author | bernie <bernie@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-13 20:54:38 +0000 |
---|---|---|
committer | bernie <bernie@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-07-13 20:54:38 +0000 |
commit | 2c04b9516a7c03bfeb93d680905b42071380c24b (patch) | |
tree | f8cecab53232e9ebcd43e6bdf97e6e810b05c431 /include/libiberty.h | |
parent | 70a8c47a53cee2379839901f45b6c2d2a74c81fc (diff) | |
download | gcc-2c04b9516a7c03bfeb93d680905b42071380c24b.tar.gz |
* libiberty.h (ASTRDUP): Add casts required for stricter
type conversion rules of C++.
* obstack.h (obstack_free): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@84642 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'include/libiberty.h')
-rw-r--r-- | include/libiberty.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/libiberty.h b/include/libiberty.h index 761b2cf060f..5c101538580 100644 --- a/include/libiberty.h +++ b/include/libiberty.h @@ -309,7 +309,7 @@ extern PTR C_alloca PARAMS ((size_t)) ATTRIBUTE_MALLOC; # define ASTRDUP(X) \ (__extension__ ({ const char *const libiberty_optr = (X); \ const unsigned long libiberty_len = strlen (libiberty_optr) + 1; \ - char *const libiberty_nptr = alloca (libiberty_len); \ + char *const libiberty_nptr = (char *const) alloca (libiberty_len); \ (char *) memcpy (libiberty_nptr, libiberty_optr, libiberty_len); })) #else # define alloca(x) C_alloca(x) @@ -323,7 +323,7 @@ extern unsigned long libiberty_len; # define ASTRDUP(X) \ (libiberty_optr = (X), \ libiberty_len = strlen (libiberty_optr) + 1, \ - libiberty_nptr = alloca (libiberty_len), \ + libiberty_nptr = (char *) alloca (libiberty_len), \ (char *) memcpy (libiberty_nptr, libiberty_optr, libiberty_len)) #endif |