delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/10/20:20:42

Date: Wed, 10 Dec 1997 17:18:37 -0800 (PST)
Message-Id: <199712110118.RAA12597@adit.ap.net>
Mime-Version: 1.0
To: diegodc AT arrakis DOT es (diego), djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: type size is NO longer ok

At 08:34  12/10/1997 GMT, diego wrote:
>Hi,
>
>	I turn on the pc and run rhide again, but to my surprise the proyect
>did not work. After a while I realized that type size had changed!!!!!
>
>	Now after a sizeof(...) here is what I get:
>char -> 1byte
>int -> 4bytes
>long int -> 4bytes
>....
>
>	As you can see char is now 1byte long, and long int is just like an
>ordinary int!!! (They also have ranges of 256, etc. of the size
>reported).
This is perfectly normal. `int' is a 32-bit value, and so is `long int'.
`char' is supposed to be one byte in size. It's legal for `long int' to be
the same size as `int', as long as it isn't shorter.

Did you expect them to be different? If so, why?

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019