public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Brown <david@westcontrol.com>
To: Martin Sebor <msebor@gmail.com>,
	Kostas Savvidis <ksavvidis@gmail.com>,	<gcc-help@gcc.gnu.org>
Subject: Re: 128-bit integer - nonsensical documentation?
Date: Fri, 28 Aug 2015 06:54:00 -0000	[thread overview]
Message-ID: <55E005A7.6000002@westcontrol.com> (raw)
In-Reply-To: <55DF2814.3050206@gmail.com>

On 27/08/15 17:09, Martin Sebor wrote:
>> Is it fair to say that the main use of extended integers is to "fill the
>> gaps" if the sequence char, short, int, long, long long has missing
>> sizes?  Such as if an architecture defines int to be 64-bit and short to
>> be 32-bit, then you could have an extended integer type for 16-bit?
> 
> Something like that. The extended integer types were invented by
> the committee in hopes of a) easing the transition from 16-bit
> to 32-bit to 64-bit implementations and b) making it possible for
> implementers targeting new special-purpose hardware to extend the
> language in useful and hopefully consistent ways to take advantage
> of the new hardware. One idea was to support bi-endian types in
> the type system. There was no experience with these types when
> they were introduced and I don't have the impression they've been
> as widely adopted as had been envisioned. Intel Bi-endian compiler
> does provide support for "extended" mixed-endian types in the same
> program.
> 

By "bi-endian types", you mean something like "int_be32_t" for a 32-bit
integer that is viewed as big-endian, regardless of whether the target
is big or little endian?  (Alternatively, you could have "big_endian",
etc., as type qualifiers.)  That would be an extremely useful feature -
it would make things like file formats, file systems, network protocols,
and other data transfer easier and neater.  It can also be very handy in
embedded systems at times.  I know that the Diab Data embedded compiler
suite, now owned by Wind River which is now owned by Intel, has support
for specifying endianness - at least in structures.  If I remember
correctly, it is done with qualifiers rather than with extended integer
types.

I wonder if such mixed endian support would be better done using name
address spaces, rather than extended integer types?

(Sorry for changing the topic of the thread slightly - control of
endianness is one of the top lines in my wish-list for gcc features.)

David

  reply	other threads:[~2015-08-28  6:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-26 11:04 Kostas Savvidis
2015-08-26 11:44 ` Jeffrey Walton
2015-08-26 12:13 ` David Brown
2015-08-26 16:02   ` Martin Sebor
2015-08-27  7:12     ` David Brown
2015-08-27  9:32       ` Jonathan Wakely
2015-08-27  9:42         ` Marc Glisse
2015-08-27  9:43           ` Jonathan Wakely
2015-08-27 15:09       ` Martin Sebor
2015-08-28  6:54         ` David Brown [this message]
2015-08-28 15:30           ` Martin Sebor
2015-08-26 12:22 ` Jonathan Wakely
2015-08-26 12:32   ` Kostas Savvidis
2015-08-26 12:39     ` Jonathan Wakely
2015-08-26 12:47       ` Jeffrey Walton
2015-08-26 12:47     ` David Brown
2015-08-26 12:48   ` Jeffrey Walton
2015-08-26 12:51     ` Marc Glisse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55E005A7.6000002@westcontrol.com \
    --to=david@westcontrol.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=ksavvidis@gmail.com \
    --cc=msebor@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).