public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/59854] New: Types with specific endianness
@ 2014-01-17 6:41 hpa at zytor dot com
2014-01-17 8:29 ` [Bug c/59854] " ebotcazou at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: hpa at zytor dot com @ 2014-01-17 6:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59854
Bug ID: 59854
Summary: Types with specific endianness
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: hpa at zytor dot com
For integer (and ideally floating-point) types, it would be very nice to be
able to explicitly specify bigendian or littleendian, with the definition that
when stored in memory, these types are byteswapped if necessary. This would
allow a much more natural and less error-prone way to build data structures for
interchange than what is currently possible.
Obviously, the "as if" rule applies: if it is not observable that something is
stored in memory (e.g. a stack variable for which an address is never taken)
the compiler is allowed to elide the byte swapping as an optimization.
Ideally, this should be added to the C and C++ standards, but perhaps an
implementation in gcc would help make that actually happen.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c/59854] Types with specific endianness
2014-01-17 6:41 [Bug c/59854] New: Types with specific endianness hpa at zytor dot com
@ 2014-01-17 8:29 ` ebotcazou at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2014-01-17 8:29 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59854
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-01-17
CC| |ebotcazou at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
There is an implementation available on the scalar-storage-order branch.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-17 8:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-17 6:41 [Bug c/59854] New: Types with specific endianness hpa at zytor dot com
2014-01-17 8:29 ` [Bug c/59854] " ebotcazou at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).