Changeset e50b4bd in rtems for cpukit


Ignore:
Timestamp:
Dec 6, 2018, 12:40:08 PM (11 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
187ef31
Parents:
4e46ba8
git-author:
Sebastian Huber <sebastian.huber@…> (12/06/18 12:40:08)
git-committer:
Sebastian Huber <sebastian.huber@…> (12/06/18 12:41:59)
Message:

score: Use typeof for strict ISO C compat

Enable the use of RTEMS_DEVOLATILE() and RTEMS_DECONST() in strict ISO C
environments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/include/rtems/score/basedefs.h

    r4e46ba8 re50b4bd  
    398398/* The reference type idea based on libHX by Jan Engelhardt */
    399399#define RTEMS_TYPEOF_REFX(_ptr_level, _ptr_type) \
    400   typeof(_ptr_level(union { int z; typeof(_ptr_type) x; }){0}.x)
     400  __typeof__(_ptr_level(union { int z; __typeof__(_ptr_type) x; }){0}.x)
    401401
    402402#if defined(__GNUC__) && !defined(ASM)
     
    481481  #define RTEMS_HAVE_MEMBER_SAME_TYPE( _t_lhs, _m_lhs, _t_rhs, _m_rhs ) \
    482482    __builtin_types_compatible_p( \
    483       __typeof( ( (_t_lhs *) 0 )->_m_lhs ), \
    484       __typeof( ( (_t_rhs *) 0 )->_m_rhs ) \
     483      __typeof__( ( (_t_lhs *) 0 )->_m_lhs ), \
     484      __typeof__( ( (_t_rhs *) 0 )->_m_rhs ) \
    485485    )
    486486#else
Note: See TracChangeset for help on using the changeset viewer.