[PATCH] Fix ODR violations in code using <ext/atomicity.h>

Jonathan Wakely jwakely@redhat.com
Sat Jul 6 22:02:00 GMT 2019


On 05/07/19 19:44 +0100, Jonathan Wakely wrote:
>On 05/07/19 20:23 +0200, Daniel Krügler wrote:
>>Am Fr., 5. Juli 2019 um 18:13 Uhr schrieb Jonathan Wakely <jwakely@redhat.com>:
>>>
>>[..]
>>>I decided against the simplification in the second patch, and
>>>committed the attached one which is closer to the first patch I sent
>>>(preserving the __atomic_add and __exchange_and_add functions even
>>>when they just call the built-ins).
>>>
>>>Tested x86_64-linux, powerpc64-linux, powerpc-aix. Committed to trunk.
>>
>>Unrelated to the actual patch, I noticed some explicit "throw()" forms
>>used as exception specifications - shouldn't these be replaced by
>>either explicit "noexcept" or at least by a library macro that expands
>>to one or the other?
>
>Yes, they should be _GLIBCXX_NOTHROW.
>
>>(I'm sorry, if such unrelated questions are
>>considered as inappropriate for this list).
>
>Entirely appropriate, thanks!


Here's a patch to fix that and the dumb mistake I made in
__atomic_add_dispatch. I'll commit after testing finishes.




-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.txt
Type: text/x-patch
Size: 1285 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190706/6af12f39/attachment.bin>


More information about the Gcc-patches mailing list