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

2021-05-26 Thread ebotcazou at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79216 Eric Botcazou changed: What|Removed |Added Resolution|--- |FIXED Status|NEW

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

2017-01-26 Thread hpa at zytor dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79216 --- Comment #10 from H. Peter Anvin --- It is not. I guess I'd like to modify the request to allow __attribute__((scalar_storage_order())) to be specified for scalar *pointer*. That would bring the 90% up to 99% at the very least; the inability

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

2017-01-26 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79216 --- Comment #9 from Eric Botcazou --- > I guess I'm confused why it would not be possible to specify the endianness > of a scalar, or perhaps far more importantly a pointer to a scalar. Other > than that, this feature seems to do 90% of what I w

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

2017-01-26 Thread hpa at zytor dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79216 --- Comment #8 from H. Peter Anvin --- I guess I'm confused why it would not be possible to specify the endianness of a scalar, or perhaps far more importantly a pointer to a scalar. Other than that, this feature seems to do 90% of what I was as

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

2017-01-25 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79216 --- Comment #7 from Eric Botcazou --- > 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

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

2017-01-25 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79216 Eric Botcazou changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

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

2017-01-25 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79216 Richard Biener changed: What|Removed |Added CC||ebotcazou at gcc dot gnu.org --- Commen

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

2017-01-24 Thread hpa at zytor dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79216 --- Comment #4 from H. Peter Anvin --- 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

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

2017-01-24 Thread hpa at zytor dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79216 --- Comment #3 from H. Peter Anvin --- 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__((s

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

2017-01-24 Thread joseph at codesourcery dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79216 --- Comment #2 from joseph at codesourcery dot com --- Does the scalar_storage_order attribute added in GCC 6 help for at least some of this?

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

2017-01-24 Thread hpa at zytor dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79216 --- Comment #1 from H. Peter Anvin --- The idea being that assignments to/from such a data item would make the compiler generate the appropriate byte-swapping instructions appropriate for the architecture. If part of a packed structure, this wou