[Bug c/79216] Feature request: byte order attributes

ebotcazou at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 25 11:50:00 GMT 2017


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79216

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-01-25
     Ever confirmed|0                           |1

--- Comment #6 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> It does indeed, I don't know why I missed it.  The only thing that I really
> see as a problem with it is that it doesn't allow the assignment of
> endianness to scalar pointers, e.g.:
> 
> uint32_t __attribute__((scalar_storage_order("big-endian"))) *blah;
> 
> blah = &foo.bar;    /* bigendian field in a structure */

Yes, you cannot specify the endianness of scalars on an individual basis,
that's what makes the feature realistically implementable in a production
compiler.


More information about the Gcc-bugs mailing list