Open llvmbot opened 7 years ago
The '-fno-strict-alias' flag disables all alias semantics, which is useful for some applications where these would be violated. The opposite of this would be a useful addition, which would basically provide FORTRAN like aliasing semantics for C / C++, by adding an implicit 'restrict' to every pointer.
Every pointer, or only those pointers that are function arguments?
Every pointer (ideally, configurable, to only be for function arguments, but not required).
The '-fno-strict-alias' flag disables all alias semantics, which is useful for some applications where these would be violated. The opposite of this would be a useful addition, which would basically provide FORTRAN like aliasing semantics for C / C++, by adding an implicit 'restrict' to every pointer.
Every pointer, or only those pointers that are function arguments?
ICC provides this (I think it's still somewhat experimental, FWIW) under -fno-alias
.
Extended Description
The '-fno-strict-alias' flag disables all alias semantics, which is useful for some applications where these would be violated. The opposite of this would be a useful addition, which would basically provide FORTRAN like aliasing semantics for C / C++, by adding an implicit 'restrict' to every pointer.