This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch-rfc] N2179: Exception Propagation in C++


Hi,

I can make it an int, but this may cause an ambiguity in the
ABI description for 64-bit targets. Can I rely on the structure
padding rules in the ABI to ensure cross-compiler compatibility, or
do I need to pad this manually? And if I do, how do I best do this?

To be clear, an _Atomic_word, like in the attached which I quickly hacked, untested (if you can, please double check the reference counting for off-by-one errors, thanks in advance).

A union { size_t __dummy; _Atomic_word __refs; } should work, as long as sizeof(size_t) >= sizeof(_Atomic_word).



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]