delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/18/09:52:36

Date: Tue, 18 Nov 1997 16:52:11 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Thomas Demmer <demmer AT LSTM DOT Ruhr-UNI-Bochum DOT De>
cc: djgpp AT delorie DOT com
Subject: Re: GDB and extended type
In-Reply-To: <34718BFB.D4C245D@LSTM.Ruhr-UNI-Bochum.De>
Message-ID: <Pine.SUN.3.91.971118165008.6121D-100000@is>
MIME-Version: 1.0

On Tue, 18 Nov 1997, Thomas Demmer wrote:

> > I saw that sizeof(DOUBLEST) is 12 instead of 10,
> > but I have no idea from were this comes from !!
> 
> Just a wild guess: Memory alignment. Variables are
> aligned to a 4 Byte boundary, so if you use an extended in
> a struct, it eats 12 Bytes. 

This guess is correct.  GCC pads to a multiple of 4 bytes (otherwise 
arrays of long double would suffer from unaligned accesses).

So the sizeof being 12 bytes is normal and is not necessarily connected 
to the GDB problem.

- Raw text -


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