Hacker News new | ask | show | jobs
by pjmlp 3173 days ago
Kind of, compilers don't enforce correct use of restrict which opens the doors to strange errors, as it is UB if they actually do overlap.

Which is the main reason why ANSI C++ members are not keen in having restrict in C++.

1 comments

Agreed. However, C++ pragmatically does have restrict in both clang and g++, which is still useful in cases where you can deductively prove the lack of aliasing.
There are more compilers out there, although I do agree in the context of HPC, those are probably the most used ones.