| delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mail set sender to djgpp-workers-bounces using -f |
| From: | <ams AT ludd DOT ltu DOT se> |
| Message-Id: | <200411111008.iABA89dA009815@speedy.ludd.ltu.se> |
| Subject: | Re: Alignment problem on Windows XP |
| In-Reply-To: | <01c4c768$Blat.v2.2.2$4dcfb280@zahav.net.il> "from Eli Zaretskii |
| at Nov 10, 2004 10:59:24 pm" | |
| To: | djgpp-workers AT delorie DOT com |
| Date: | Thu, 11 Nov 2004 11:08:09 +0100 (CET) |
| X-Mailer: | ELM [version 2.4ME+ PL78 (25)] |
| MIME-Version: | 1.0 |
| X-ltu-MailScanner-Information: | Please contact the ISP for more information |
| X-ltu-MailScanner: | Found to be clean |
| X-MailScanner-From: | ams AT ludd DOT ltu DOT se |
| Reply-To: | djgpp-workers AT delorie DOT com |
| Errors-To: | nobody AT delorie DOT com |
| X-Mailing-List: | djgpp-workers AT delorie DOT com |
| X-Unsubscribes-To: | listserv AT delorie DOT com |
According to Eli Zaretskii:
> The short test program attached at the end of this message prints
> zero values on Windows 98, but a user who tried it on XP told me it
> printed "4", which means that __attribute__((__aligned__)) is not
> working on XP.
...
> #define GCTYPEBITS 3
> # define DECL_ALIGN(type, var) \
> type __attribute__ ((__aligned__ (1 << GCTYPEBITS))) var
>
> struct SS
> {
> char *ptr;
> long nr;
> };
>
>
> DECL_ALIGN (struct SS, ss1);
> DECL_ALIGN (struct SS, ss2);
> DECL_ALIGN (struct SS, ss3);
> DECL_ALIGN (struct SS, ss4);
FWIW, on WINDOWS 2000 and with gcc 2.952, gcc warns while compiling
that the alignment of ss* "is greater than maximum object file
aligment. Using 4."
Right,
MartinS
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |