This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/51628] __attribute__((packed)) is unsafe in some cases
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 20 Dec 2011 12:35:18 +0000
- Subject: [Bug c/51628] __attribute__((packed)) is unsafe in some cases
- Auto-submitted: auto-generated
- References: <bug-51628-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51628
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-12-20 12:35:18 UTC ---
What Ada does looks just like a workaround for what should be done properly in
the expander. So no, IMHO we shouldn't be changing all other FEs and the
middle-end (when it wants to generate them e.g. for memcpy) to do what Ada
does, but we should change the expander. It has all the information to perform
the unaligned reads/writes, it just doesn't use them.