News for hackers. Stuff that matters.
Re:My C code works with -O3 but not with -O0 by apta on Thursday January 16, 2020 @01:13PM (#22067204)
I think OP was implying not to write new code in C. If possible, we can also use replacement tools written in safer languages if they offer the functionality we need (e.g. `ripgrep` instead of `grep`, or web servers written in safe languages over those written in C/C++).
Re:My C code works with -O3 but not with -O0 by boomer_joe on Thursday January 16, 2020 @01:36PM (#22067434)
ripgrep isn't POSIX compliant. It's hardly a proper replacement.
Re:My C code works with -O3 but not with -O0 by burntsushi on Thursday January 16, 2020 @04:06PM (#22068922)
Right, it is intentionally not POSIX compliant. This saves fairly significant development effort and also permits expanding the tool to be more user friendly, such as transparently searching UTF-16 encoded files.

ripgrep cannot be a drop-in replacement. Despite that, it can certainly replace grep in a wide variety of use cases. See: https://github.com/BurntSushi/ripgrep/blob/master/FAQ.md#pos...