Why is -fno-strict-aliasing needed for gsl::byte?
jwakely opened this issue · comments
Jonathan Wakely commented
The project README says:
Note: For
gsl::byte
to work correctly with Clang and GCC you might have to use the-fno-strict-aliasing
compiler option.
Please explain this clearly. Which versions are affected? Why is it needed? Is it only for versions of those compilers that don't support the __may_alias__
attribute? Only when gsl::byte
is defined by GSL rather than as an alias for std::byte
? Something else?
Currently this says to me "don't use gsl::byte
".
Herb Sutter commented
Maintainers' call: We think this is a stray/stale comment. Removing. Thanks!