diff options
author | Paul Brook <paul@codesourcery.com> | 2004-08-12 18:50:38 +0000 |
---|---|---|
committer | Paul Brook <pbrook@gcc.gnu.org> | 2004-08-12 18:50:38 +0000 |
commit | 47bedfb079ef53e4d072174d704f99dc96e6404d (patch) | |
tree | 9d9768cdf5728e85f1fc24224880745b23da275d /libstdc++-v3/config/cpu | |
parent | 4951f98d315e04235f40ff6e7d81e063ed92cb3b (diff) | |
download | gcc-47bedfb079ef53e4d072174d704f99dc96e6404d.zip gcc-47bedfb079ef53e4d072174d704f99dc96e6404d.tar.gz gcc-47bedfb079ef53e4d072174d704f99dc96e6404d.tar.bz2 |
cxxabi_tweaks.h: Define __cxa_vec_ctor_return and _GLIBCXX_CXA_VEC_CTOR_RETURN.
* config/cpu/arm/cxxabi_tweaks.h: Define __cxa_vec_ctor_return and
_GLIBCXX_CXA_VEC_CTOR_RETURN.
* config/cpu/generic/cxxabi_tweaks.h: Ditto.
* libsupc++/cxxabi.h (__cxa_vec_ctor, __cxa_vec_cctor): Use
__cxa_vec_ctor_return.
* libsupc++/vec.cc (__cxa_vec_ctor, __cxa_vec_cctor): Ditto.
Use _GLIBCXX_CXA_VEC_CTOR_RETURN.
* g++.dg/abi/arm_cxa_vec_1.C: New test.
From-SVN: r85891
Diffstat (limited to 'libstdc++-v3/config/cpu')
-rw-r--r-- | libstdc++-v3/config/cpu/arm/cxxabi_tweaks.h | 14 | ||||
-rw-r--r-- | libstdc++-v3/config/cpu/generic/cxxabi_tweaks.h | 4 |
2 files changed, 16 insertions, 2 deletions
diff --git a/libstdc++-v3/config/cpu/arm/cxxabi_tweaks.h b/libstdc++-v3/config/cpu/arm/cxxabi_tweaks.h index 9dd9435..95fe12c9 100644 --- a/libstdc++-v3/config/cpu/arm/cxxabi_tweaks.h +++ b/libstdc++-v3/config/cpu/arm/cxxabi_tweaks.h @@ -45,12 +45,22 @@ namespace __cxxabiv1 // We also want the element size in array cookies. #define _GLIBCXX_ELTSIZE_IN_COOKIE 1 -#else + // __cxa_vec_ctor should return a pointer to the array. + typedef void * __cxa_vec_ctor_return_type; +#define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return x + +#else // __ARM_EABI__ + // The generic ABI uses the first byte of a 64-bit guard variable. #define _GLIBCXX_GUARD_ACQUIRE(x) (!*(char *) (x)) #define _GLIBCXX_GUARD_RELEASE(x) *(char *) (x) = 1 __extension__ typedef int __guard __attribute__((mode (__DI__))); -#endif + + // __cxa_vec_ctor has void return type. + typedef void __cxa_vec_ctor_return_type; +#define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return + +#endif //!__ARM_EABI__ #ifdef __cplusplus } // namespace __cxxabiv1 diff --git a/libstdc++-v3/config/cpu/generic/cxxabi_tweaks.h b/libstdc++-v3/config/cpu/generic/cxxabi_tweaks.h index 983be13..48a0dec 100644 --- a/libstdc++-v3/config/cpu/generic/cxxabi_tweaks.h +++ b/libstdc++-v3/config/cpu/generic/cxxabi_tweaks.h @@ -40,6 +40,10 @@ namespace __cxxabiv1 #define _GLIBCXX_GUARD_RELEASE(x) *(char *) (x) = 1 __extension__ typedef int __guard __attribute__((mode (__DI__))); + // __cxa_vec_ctor has void return type. + typedef void __cxa_vec_ctor_return_type; +#define _GLIBCXX_CXA_VEC_CTOR_RETURN(x) return + #ifdef __cplusplus } // namespace __cxxabiv1 #endif |