This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/79216] New: 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: Tue, 24 Jan 2017 20:59:32 +0000
- Subject: [Bug c/79216] New: Feature request: byte order attributes
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79216
Bug ID: 79216
Summary: Feature request: byte order attributes
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: hpa at zytor dot com
Target Milestone: ---
It is pretty crazy that the C language doesn't have any way to indicate the
layout of external data, even though it is incredibly frequently used that way.
It ought to be a major improvement to the C language if a particular data item
could be declared with a specific byte order, either as part of a structure or
for a single data item.
Perhaps something like:
__attribute__((byteorder(little|big)))
Eventually I believe this needs to go into the C standard, but getting an
implementation in gcc would be a major step toward this.