Re:Clang is better than GCC
by userbinator on Sunday November 27, 2022 @09:34PM
(#33769220)
I suggest the author of that code try a denser language, one that requires more focus on individual characters, and figure out a more methodical approach to debugging. I saw the error at first glance, but that may just be because the code is in an unusual style (https://news.ycombinator.com/item?id=33768662); suggesting that a second pair of eyes will also help.
[ Parent
| on HN ]
Re:Clang is better than GCC
by MikePlacid on Sunday November 27, 2022 @10:40PM
(#33769582)
> that a second pair of eyes will also help.
This code will not pass a code review in my last shop:
1. First get the return code: rc = memcmp(…
2. Then compare, and please put the constant first: if( 0!=rc ) …
C and C++ are dangerous tools, you should not use in production all the “sugar” they provide.