3 ms·
Do you not use restrict in your normal everyday C code that you write? I use it in my normal C code.
by dmitrygr 10mo ago
Do you not use restrict in your normal everyday C code that you write? I use it in my normal C code.
- kouteiheika 10mo agoI used to use it, but very rarely, since it's instant UB if you get it wrong. In tiny codebases which you can hold in your head it's probably practical to sprinkle it everywhere, but in anything bigger it's quite risky. Nevertheless, I don't write normal everyday C code anymore since Rust has pretty much made it completely obsolete for the type of software I write.
- kazinator 10mo agorestrict works by making some situations undefined behavior that would otherwise be defined without it. It is probably unwise to use casually or habitually.