News for hackers. Stuff that matters.
Re:Baby Steps: Slowly Porting Musl to Rust by burfog on Tuesday June 14, 2016 @02:43AM (#11900211)
Here is the way that is correct and obvious to a modern C programmer. Real C libraries use assembly and/or multi-byte methods that violate aliasing rules.

  size_t strlen(const char *restrict const s){
          const char *restrict t = s;
          while(*t++)
                  ;
          return t-s-1;
  }

There are no comments on this comment yet.