diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-12-06 13:40:08 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2018-12-06 13:41:59 +0100 |
commit | e50b4bd341b905da2c727b16b7d821a3deb392bc (patch) | |
tree | 4b79ddd5bfe27e919b03452e8cfc2395b298e8fb /cpukit | |
parent | rtems: Fix rtems_task_restart() argument type (diff) | |
download | rtems-e50b4bd341b905da2c727b16b7d821a3deb392bc.tar.bz2 |
score: Use __typeof__ for strict ISO C compat
Enable the use of RTEMS_DEVOLATILE() and RTEMS_DECONST() in strict ISO C
environments.
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/include/rtems/score/basedefs.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cpukit/include/rtems/score/basedefs.h b/cpukit/include/rtems/score/basedefs.h index 97f4fce8d0..e4846816f4 100644 --- a/cpukit/include/rtems/score/basedefs.h +++ b/cpukit/include/rtems/score/basedefs.h @@ -397,7 +397,7 @@ /* The reference type idea based on libHX by Jan Engelhardt */ #define RTEMS_TYPEOF_REFX(_ptr_level, _ptr_type) \ - typeof(_ptr_level(union { int z; typeof(_ptr_type) x; }){0}.x) + __typeof__(_ptr_level(union { int z; __typeof__(_ptr_type) x; }){0}.x) #if defined(__GNUC__) && !defined(ASM) #if ((__GNUC__ * 1000 + __GNUC_MINOR__) >= 4004) @@ -480,8 +480,8 @@ extern void RTEMS_DEQUALIFY_types_not_compatible(void); #ifdef __GNUC__ #define RTEMS_HAVE_MEMBER_SAME_TYPE( _t_lhs, _m_lhs, _t_rhs, _m_rhs ) \ __builtin_types_compatible_p( \ - __typeof( ( (_t_lhs *) 0 )->_m_lhs ), \ - __typeof( ( (_t_rhs *) 0 )->_m_rhs ) \ + __typeof__( ( (_t_lhs *) 0 )->_m_lhs ), \ + __typeof__( ( (_t_rhs *) 0 )->_m_rhs ) \ ) #else #define RTEMS_HAVE_MEMBER_SAME_TYPE( _t_lhs, _m_lhs, _t_rhs, _m_rhs ) \ |