[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gcc bug causes parted to write bad GPT entries
From: |
Andreas Dilger |
Subject: |
Re: gcc bug causes parted to write bad GPT entries |
Date: |
Mon, 18 Mar 2002 07:13:20 -0700 |
User-agent: |
Mutt/1.3.27i |
On Mar 18, 2002 10:36 +0000, Richard Hirst wrote:
> diff -ur parted-1.4.24-1.ori/include/parted/disk_gpt.h
> parted-1.4.24-1.fix.no-packed/include/parted/disk_gpt.h
> --- parted-1.4.24-1.ori/include/parted/disk_gpt.h Mon Oct 1 22:06:33 2001
> +++ parted-1.4.24-1.fix.no-packed/include/parted/disk_gpt.h Mon Mar 18
> 10:27:54 2002
> @@ -49,7 +49,14 @@
> uint8_t clock_seq_hi_and_reserved;
> uint8_t clock_seq_low;
> uint8_t node[6];
> +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR > 0)
> } __attribute__ ((packed)) efi_guid_t;
> +#else
> +/* ((packed)) here exposes a bug in older versions of gcc. Structure is
> + * naturally packed anyway, so it doesn't strictly matter.
> + */
> +} efi_guid_t;
> +#endif
A minor issue, but in general it is better to keep the parenthesis
outside the #ifdef block, so that syntax highlighting and "find matching
parenthesis" work properly.
@@ -49,7 +49,15 @@
uint8_t clock_seq_hi_and_reserved;
uint8_t clock_seq_low;
uint8_t node[6];
-} __attribute__ ((packed)) efi_guid_t;
+}
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR > 0)
+__attribute__ ((packed)) efi_guid_t;
+#else
+/* ((packed)) here exposes a bug in older versions of gcc. Structure is
+ * naturally packed anyway, so it doesn't strictly matter.
+ */
+efi_guid_t;
+#endif
#define UNUSED_ENTRY_GUID \
Cheers, Andreas
--
Andreas Dilger \ "If a man ate a pound of pasta and a pound of antipasto,
\ would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/ -- Dogbert
- Re: gcc bug causes parted to write bad GPT entries, (continued)
- Re: gcc bug causes parted to write bad GPT entries, Andrew Clausen, 2002/03/15
- Re: gcc bug causes parted to write bad GPT entries, Richard Hirst, 2002/03/15
- Re: gcc bug causes parted to write bad GPT entries, Andrew Clausen, 2002/03/15
- Re: gcc bug causes parted to write bad GPT entries, Richard Hirst, 2002/03/15
- Re: gcc bug causes parted to write bad GPT entries, Andrew Clausen, 2002/03/15
- Re: gcc bug causes parted to write bad GPT entries, Richard Hirst, 2002/03/18
- Re: gcc bug causes parted to write bad GPT entries,
Andreas Dilger <=
RE: gcc bug causes parted to write bad GPT entries, Matt_Domsch, 2002/03/15
RE: gcc bug causes parted to write bad GPT entries, Matt_Domsch, 2002/03/18
RE: gcc bug causes parted to write bad GPT entries, Matt_Domsch, 2002/03/18
RE: gcc bug causes parted to write bad GPT entries, Matt_Domsch, 2002/03/19
RE: gcc bug causes parted to write bad GPT entries, Matt_Domsch, 2002/03/19