This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/79216] Feature request: byte order attributes
- From: "hpa at zytor dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 25 Jan 2017 02:04:36 +0000
- Subject: [Bug c/79216] Feature request: byte order attributes
- Auto-submitted: auto-generated
- References: <bug-79216-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79216
--- Comment #4 from H. Peter Anvin <hpa at zytor dot com> ---
As in, I would expect that:
struct foo __attribute__((scalar_storage_order("big-endian")))
{
uint32_t bar;
} foo;
uint32_t *baz = &foo.bar;
... would give an error on a littleendian architecture and a warning on a
bigendian architecture, however, at this point it seems to be completely quiet
about it.
Finally, the section in the manual about type-punning in the presence of this
attribute is very opaque to me. I am not sure what it means is allowed or
disallowed, or how things would work in the presence of casts.