diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2019-07-05 17:10:47 +0100 |
---|---|---|
committer | Jonathan Wakely <redi@gcc.gnu.org> | 2019-07-05 17:10:47 +0100 |
commit | 0dc7adb03718396db1397be1ba1cb3482af957f7 (patch) | |
tree | 2c840b225d725f2019e8a84928542405624c3c39 /gcc/tree-ssa-loop-manip.c | |
parent | 6e158c5fd534a1080dd013ed5d9d3fcc3fe838ff (diff) | |
download | gcc-0dc7adb03718396db1397be1ba1cb3482af957f7.zip gcc-0dc7adb03718396db1397be1ba1cb3482af957f7.tar.gz gcc-0dc7adb03718396db1397be1ba1cb3482af957f7.tar.bz2 |
Fix ODR violations in code using <ext/atomicity.h>
Because the inline versions of __exchange_and_add and __atomic_add are
also marked static, they cannot be used from templates or other inline
functions without ODR violations. This change gives them external
linkage, but adds the always_inline attribute.
* include/ext/atomicity.h [_GLIBCXX_ATOMIC_BUILTINS] (__atomic_add)
(__exchange_and_add): Replace static specifier with always_inline
attribute.
(__exchange_and_add_single, __atomic_add_single): Likewise.
(__exchange_and_add_dispatch, __atomic_add_dispatch): Likewise. Also
combine !__gthread_active_p() and !__GTHREADS branches.
From-SVN: r273144
Diffstat (limited to 'gcc/tree-ssa-loop-manip.c')
0 files changed, 0 insertions, 0 deletions