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 c/79216] Feature request: byte order attributes


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.

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