www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/30/09:00:15

From: bukinm AT inp DOT nsk DOT su (Michael Bukin)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Alignment
Date: Wed, 30 Apr 1997 04:52:54 GMT
Organization: BINP SD RAS
Lines: 21
Message-ID: <3366cd70.6952476@news-win.inp.nsk.su>
References: <33636F49 DOT 4CE AT silesia DOT top DOT pl>
Reply-To: bukinm AT inp DOT nsk DOT su
NNTP-Posting-Host: csd-bsdi.inp.nsk.su
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Sun, 27 Apr 1997 15:22:49 GMT, Michal <wapex AT silesia DOT top DOT pl> wrote:

> Few weeks ago I was posting to ask how to align a global int variable.
> The ansewr was 'see section 14.3 if FAQ'. I've checked it and I've
> figured out that variables are aligned on boudary wich is half of their
> size. I thought that they're aligned on boundary which is execly their
> size, and I was asking about non-standard boundary (like for example
> 16). Am I right? Maybe I just didn't understand the text (english isn't
> my national lounguage)?.

struct test_t
{
  int a;
} __attribute__ ((__aligned__ (16)));

About type attributes:
info gcc "c extensions" "type attributes"

About variable attributes:
info gcc "c extensions" "variable attributes"

- Raw text -


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