mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "J.A. Magallon" <jamagallon@able.es>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [OT] sizeof C types ...
Date: Mon, 25 Aug 2003 23:19:50 +0200	[thread overview]
Message-ID: <20030825211950.GC3346@werewolf.able.es> (raw)
In-Reply-To: <20030825202721.A10828@infradead.org>; from hch@infradead.org on Mon, Aug 25, 2003 at 21:27:21 +0200


On 08.25, Christoph Hellwig wrote:
> > char,
> 
> 8 bits
> 
> > short,
> 
> 16 bits
> 
> > int,
> 
> 32 bits
> 
> > long,
> 
> either 32 or 64 bits
> 
> > long int,
> 
> dito. long is just the short form of long int
> 
> > long long, ...
> 
> 64 bits
> 

If you don't go away from linux, OK.

Really:
char = 8bit
long int = 32 or 64, depending on arch
long long = 64 bits

int = ??? almost anything, depending on arch and compiler.
Run DOS on your P4, with an old compiler, and int defaults to 16 bits.
I think the same also happens for Win16.

int is defined ad the native word size of the hardware+OS.

-- 
J.A. Magallon <jamagallon@able.es>      \                 Software is like sex:
werewolf.able.es                         \           It's better when it's free
Mandrake Linux release 9.2 (Cooker) for i586
Linux 2.4.22-rc3-jam1m (gcc 3.3.1 (Mandrake Linux 9.2 3.3.1-1mdk))

  parent reply	other threads:[~2003-08-25 21:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-25 19:13 Herbert Pötzl
2003-08-25 19:27 ` Christoph Hellwig
2003-08-25 19:38   ` Herbert Pötzl
2003-08-25 22:37     ` Erik Andersen
2003-08-25 21:19   ` J.A. Magallon [this message]
2003-08-25 22:09     ` Zwane Mwaikambo
2003-08-26  7:30     ` Christoph Hellwig
2003-08-25 19:29 ` Randy.Dunlap
2003-08-25 19:41   ` Herbert Pötzl
2003-08-25 19:44   ` Christoph Hellwig
2003-08-25 19:56     ` Herbert Pötzl

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=20030825211950.GC3346@werewolf.able.es \
    --to=jamagallon@able.es \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®