Is there a way to get Clang, GCC or Visual Studio to emit a runtime warning whenever memory access is misaligned and preferably also emit source code location for it?
I need to find all spots in my huge legacy sources (that I didn't write myself) which contain unaligned accesses and then wrap them in a filter explicitly, which makes them aligned.
I need this to port the sources to platforms that will break on misaligned access.