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.

Reply via email to