Changes in libcfa/prelude/builtins.c [2ead704:e84ab3d]
- File:
- 
      - 1 edited
 
 - 
          
  libcfa/prelude/builtins.c (modified) (2 diffs)
 
Legend:
- Unmodified
- Added
- Removed
- 
      libcfa/prelude/builtins.cr2ead704 re84ab3d 10 10 // Created On : Fri Jul 21 16:21:03 2017 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Wed Jul 21 13:31:34202113 // Update Count : 1 2912 // Last Modified On : Tue Apr 13 17:26:32 2021 13 // Update Count : 117 14 14 // 15 15 … … 77 77 // implicit increment, decrement if += defined, and implicit not if != defined 78 78 79 // C11 reference manual Section 6.5.16 (page101): "An assignment expression has the value of the left operand after the80 // assignment, but is not an lvalue." Hence, return a value not a reference.81 79 static inline { 82 forall( T | { T ?+=?(T &, one_t ); } )83 T ++?(T & x ) { return x += 1; }80 forall( DT & | { DT & ?+=?( DT &, one_t ); } ) 81 DT & ++?( DT & x ) { return x += 1; } 84 82 85 forall( T | { T ?+=?(T &, one_t ); } )86 T ?++( T & x ) {T tmp = x; x += 1; return tmp; }83 forall( DT & | sized(DT) | { void ?{}( DT &, DT ); void ^?{}( DT & ); DT & ?+=?( DT &, one_t ); } ) 84 DT & ?++( DT & x ) { DT tmp = x; x += 1; return tmp; } 87 85 88 forall( T | { T ?-=?(T &, one_t ); } )89 T --?(T & x ) { return x -= 1; }86 forall( DT & | { DT & ?-=?( DT &, one_t ); } ) 87 DT & --?( DT & x ) { return x -= 1; } 90 88 91 forall( T | { T ?-=?(T &, one_t ); } )92 T ?--( T & x ) {T tmp = x; x -= 1; return tmp; }89 forall( DT & | sized(DT) | { void ?{}( DT &, DT ); void ^?{}( DT & ); DT & ?-=?( DT &, one_t ); } ) 90 DT & ?--( DT & x ) { DT tmp = x; x -= 1; return tmp; } 93 91 94 forall( T | { int ?!=?( T, zero_t ); } )95 int !?( T & x ) { return !( x != 0 ); }92 forall( DT & | { int ?!=?( const DT &, zero_t ); } ) 93 int !?( const DT & x ) { return !( x != 0 ); } 96 94 } // distribution 97 95 
  Note:
 See   TracChangeset
 for help on using the changeset viewer.
  