diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-22 14:58:36 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-11-22 14:58:36 +0000 |
commit | cfea6514a4b6ced0930593ebb48d0037e9716d87 (patch) | |
tree | eeccf866e18463f7dc7ea882ea944247d4ed1010 /gcc/ginclude | |
parent | 9456798d72d0e81a2a553287f436dcb05cff175a (diff) | |
download | gcc-cfea6514a4b6ced0930593ebb48d0037e9716d87.tar.gz |
[./]
2013-11-22 Basile Starynkevitch <basile@starynkevitch.net>
{{merge with trunk GCC 4.9 svn rev 205247 now in stage 3}}
[gcc/]
2013-11-22 Basile Starynkevitch <basile@starynkevitch.net>
{{merge with trunk GCC 4.9 svn rev 205247 now in stage 3}}
* Makefile.in (MELT_GCC_VERSION_NUM): New make variable.
(melt-run-md5.h, melt-run.h): Use it.
* melt-runtime.cc: With GCC 4.9 include print-tree.h,
gimple-iterator.h, gimple-walk.h.
(meltgc_start_all_new_modules, meltgc_start_flavored_module)
(meltgc_do_initial_mode, meltgc_set_user_options)
(meltgc_load_modules_and_do_mode): Improve debugprintf...
(melt_gt_ggc_mx_gimple_seq_d): Handle GCC 4.9 specifically.
* melt-runtime.h (gt_ggc_mx_gimple_statement_d): Temporarily
define this macro.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@205264 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ginclude')
-rw-r--r-- | gcc/ginclude/stdatomic.h | 42 |
1 files changed, 25 insertions, 17 deletions
diff --git a/gcc/ginclude/stdatomic.h b/gcc/ginclude/stdatomic.h index 622577f0877..b558bf10f19 100644 --- a/gcc/ginclude/stdatomic.h +++ b/gcc/ginclude/stdatomic.h @@ -87,7 +87,7 @@ typedef _Atomic __UINTMAX_TYPE__ atomic_uintmax_t; #define kill_dependency(Y) \ __extension__ \ ({ \ - __typeof__ (Y) __kill_dependency_tmp = (Y); \ + __auto_type __kill_dependency_tmp = (Y); \ __kill_dependency_tmp; \ }) @@ -121,9 +121,9 @@ typedef _Atomic __UINTMAX_TYPE__ atomic_uintmax_t; __atomic_type_lock_free (void * _Atomic) -/* Note that these macros require __typeof__ to remove _Atomic - qualifiers (and const qualifiers, if those are valid on macro - operands). +/* Note that these macros require __typeof__ and __auto_type to remove + _Atomic qualifiers (and const qualifiers, if those are valid on + macro operands). Also note that the header file uses the generic form of __atomic builtins, which requires the address to be taken of the value @@ -132,11 +132,12 @@ typedef _Atomic __UINTMAX_TYPE__ atomic_uintmax_t; these to lock-free _N variants if possible, and throw away the temps. */ -#define atomic_store_explicit(PTR, VAL, MO) \ - __extension__ \ - ({ \ - __typeof__ (*(PTR)) __atomic_store_tmp = (VAL); \ - __atomic_store ((PTR), &__atomic_store_tmp, (MO)); \ +#define atomic_store_explicit(PTR, VAL, MO) \ + __extension__ \ + ({ \ + __auto_type __atomic_store_ptr = (PTR); \ + __typeof__ (*__atomic_store_ptr) __atomic_store_tmp = (VAL); \ + __atomic_store (__atomic_store_ptr, &__atomic_store_tmp, (MO)); \ }) #define atomic_store(PTR, VAL) \ @@ -146,8 +147,9 @@ typedef _Atomic __UINTMAX_TYPE__ atomic_uintmax_t; #define atomic_load_explicit(PTR, MO) \ __extension__ \ ({ \ - __typeof__ (*(PTR)) __atomic_load_tmp; \ - __atomic_load ((PTR), &__atomic_load_tmp, (MO)); \ + __auto_type __atomic_load_ptr = (PTR); \ + __typeof__ (*__atomic_load_ptr) __atomic_load_tmp; \ + __atomic_load (__atomic_load_ptr, &__atomic_load_tmp, (MO)); \ __atomic_load_tmp; \ }) @@ -157,8 +159,10 @@ typedef _Atomic __UINTMAX_TYPE__ atomic_uintmax_t; #define atomic_exchange_explicit(PTR, VAL, MO) \ __extension__ \ ({ \ - __typeof__ (*(PTR)) __atomic_exchange_val = (VAL), __atomic_exchange_tmp; \ - __atomic_exchange ((PTR), &__atomic_exchange_val, \ + __auto_type __atomic_exchange_ptr = (PTR); \ + __typeof__ (*__atomic_exchange_ptr) __atomic_exchange_val = (VAL); \ + __typeof__ (*__atomic_exchange_ptr) __atomic_exchange_tmp; \ + __atomic_exchange (__atomic_exchange_ptr, &__atomic_exchange_val, \ &__atomic_exchange_tmp, (MO)); \ __atomic_exchange_tmp; \ }) @@ -170,8 +174,10 @@ typedef _Atomic __UINTMAX_TYPE__ atomic_uintmax_t; #define atomic_compare_exchange_strong_explicit(PTR, VAL, DES, SUC, FAIL) \ __extension__ \ ({ \ - __typeof__ (*(PTR)) __atomic_compare_exchange_tmp = (DES); \ - __atomic_compare_exchange ((PTR), (VAL), \ + __auto_type __atomic_compare_exchange_ptr = (PTR); \ + __typeof__ (*__atomic_compare_exchange_ptr) __atomic_compare_exchange_tmp \ + = (DES); \ + __atomic_compare_exchange (__atomic_compare_exchange_ptr, (VAL), \ &__atomic_compare_exchange_tmp, 0, \ (SUC), (FAIL)); \ }) @@ -183,8 +189,10 @@ typedef _Atomic __UINTMAX_TYPE__ atomic_uintmax_t; #define atomic_compare_exchange_weak_explicit(PTR, VAL, DES, SUC, FAIL) \ __extension__ \ ({ \ - __typeof__ (*(PTR)) __atomic_compare_exchange_tmp = (DES); \ - __atomic_compare_exchange ((PTR), (VAL), \ + __auto_type __atomic_compare_exchange_ptr = (PTR); \ + __typeof__ (*__atomic_compare_exchange_ptr) __atomic_compare_exchange_tmp \ + = (DES); \ + __atomic_compare_exchange (__atomic_compare_exchange_ptr, (VAL), \ &__atomic_compare_exchange_tmp, 1, \ (SUC), (FAIL)); \ }) |