From: David Brown <david@westcontrol.com>
To: "Göran Steen" <goran.steen@eis.semcon.com>
Cc: "gcc-help@gcc.gnu.org" <gcc-help@gcc.gnu.org>
Subject: Re: 16-bit int
Date: Thu, 09 Aug 2012 13:45:00 -0000 [thread overview]
Message-ID: <5023BD01.6090401@westcontrol.com> (raw)
In-Reply-To: <D046C4666884894FB2C7C3FB30B2A14B04135A@se-got-mb01.semcon.se>
On 09/08/2012 13:26, Göran Steen wrote:
> Hi!
>
> I use gcc version 4.3.4, where int is 32-bit variables. Is it
> possible to setup compiler to compile int as 16-bit variables?
>
> With best regards / Med vänlig hälsning / Mit freundlichen GrüÃen /
> Saudações
>
> Göran Steen
The size of an int depends on the target - gcc supports dozens of
targets. Most have 32-bit ints, but some have 16-bit ints and at least
one has a compile-time option to support 8-bit ints (though that goes
against C standards, and is deprecated on current builds). There are
probably also targets with 64-bit ints.
So step one in asking for help here is to tell us your target.
Step two is to tell us what you are hoping to achieve. Almost
certainly, there is no way to change the int size - and even if there
happens to be a command-line switch for the given target, it is probably
not a good idea (you'll get in a horrible mess with library
compatibility, for example). And even if it is possible, it is highly
unlikely to be advantageous. Tell us what you really want to achieve
here, and people can give you advice towards that.
mvh.,
David
next prev parent reply other threads:[~2012-08-09 13:45 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-09 11:26 Göran Steen
2012-08-09 13:45 ` David Brown [this message]
2012-08-09 18:52 ` Vincent Lefevre
2012-08-09 19:59 ` David Brown
2012-08-09 22:39 ` Vincent Lefevre
2012-08-09 22:52 ` Ian Lance Taylor
2012-08-10 6:53 ` Jose-Marcio Martins da Cruz
2012-08-11 10:33 ` Vincent Lefevre
2012-08-10 6:48 ` Georg-Johann Lay
2012-08-10 8:16 ` David Brown
2012-08-09 17:14 ` Paulo J. Matos
2012-08-10 7:16 Göran Steen
2012-08-10 8:20 ` David Brown
2012-08-10 8:35 ` David Brown
2012-08-10 8:53 ` Göran Steen
2012-08-10 9:05 ` David Brown
2012-08-10 9:19 ` Göran Steen
2012-08-10 9:21 ` David Brown
2012-08-11 15:32 ` Vincent Lefevre
2012-08-11 16:28 ` Ian Lance Taylor
2012-08-11 19:36 ` Tim Prince
2012-08-13 14:42 ` David Brown
2012-08-10 18:01 ` Jonathan Wakely
2012-08-11 10:47 ` Vincent Lefevre
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=5023BD01.6090401@westcontrol.com \
--to=david@westcontrol.com \
--cc=gcc-help@gcc.gnu.org \
--cc=goran.steen@eis.semcon.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).