On Saturday, 27 July 2013 at 09:05:32 UTC, ponce wrote:
It would be great to have something like GCC's solution: warn when pointer casts may violate the strict aliasing rule, and provide a flag to disable it.

BTW, C++ compilers usually have an effective way to disambiguate pointer aliasing so that loop code generation is better.

restrict may helps, strict aliasing may helps, but in my experience a direct annotation "I know what I'm doing, this loop does not alias" or "no loop dependency" is often more effective. This obviously require to trust the optimizing programmer a bit :)

Reply via email to