This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/55177] missed optimizations with __builtin_bswap


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55177

--- Comment #5 from David Woodhouse <dwmw2 at infradead dot org> 2012-11-02 19:41:28 UTC ---
Indeed. Bear in mind that sometimes we *hide* the actual variable (by prefixing
its name or putting it in a small struct of its own), just to *force* people to
use the appropriate byte-swapping accessor functions/macros. And with good
reason, because people will often forget to handle the endianness issues
otherwise.

So what you describe as 'really dumb' is actually something that we *force*
people to do. We'd be much worse off without it.

Of course, if we could just mark the variable with __attribute__((bigendian))
then perhaps it would all JustWorkâ ... but that's a separate discussion â


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]