delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/04/03/15:19:49

Date: Tue, 3 Apr 2001 21:02:25 +0200
From: Andrea Mazzoleni <am AT mediacom DOT it>
To: djgpp AT delorie DOT com
Subject: Alignement question
Message-ID: <20010403210225.A119@mediacom.it>
Mime-Version: 1.0
User-Agent: Mutt/1.2.5i
Reply-To: djgpp AT delorie DOT com

I need to align some static variables at 8 bytes (for MMX asm code).

I used this code :

	static char variable[8] __attribute__ ((aligned(8)));

but the compiler issues this :

	warning: alignment of `variable' is greather than maximum 
	object file alignment. Using 4.

I found that the `-malign-double' option removes the warning, but this
option have others effects that I don't need. For example align all the
double variables.

How can I align ONLY SOME variables at 8 bytes ?

-- 
Andrea Mazzoleni <am AT mediacom DOT it>
935A 2D3C 5C70 BCD6 CB0C  ED89 7C19 4321 6340 3F6D

- Raw text -


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