This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/55177] missed optimizations with __builtin_bswap
- From: "dwmw2 at infradead dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 02 Nov 2012 19:41:28 +0000
- Subject: [Bug rtl-optimization/55177] missed optimizations with __builtin_bswap
- Auto-submitted: auto-generated
- References: <bug-55177-4@http.gcc.gnu.org/bugzilla/>
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 â