From: "Kernel Panic" Newsgroups: comp.os.msdos.djgpp Subject: Alignment problem in GCC 2.95.2 Lines: 20 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2417.2000 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Message-ID: Date: Sun, 25 Aug 2002 14:43:47 GMT NNTP-Posting-Host: 62.234.48.21 X-Trace: castor.casema.net 1030286627 62.234.48.21 (Sun, 25 Aug 2002 16:43:47 MEST) NNTP-Posting-Date: Sun, 25 Aug 2002 16:43:47 MEST Organization: Euronet Internet To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi! I'm using GCC 2.95.2 (DJGPP) and having a problem with alignment.. Compiling the following line: kernel_info_page_t kernel_info_page __attribute__((aligned(PAGE_SIZE))) (it's beginning of a structure) I get a message like: global.c:31: warning: alignment of `struct kernel_info_page_t kernel_info_page' is greater than maximum object file alignment. Using 4. I haven't found any other way to set the alignment than with ugly assembler macros. This compiled correctly on FreeBSD (with the same GCC version! Though I don't understand how it's possible..).. Any suggestions?.. BTW, how does GCC know what file format it's actually going to be?..