[Bug target/87344] archival/libarchive/decompress_gunzip.c:1139:2: error: size of unnamed array is negative, -mms-bitfields influences non-bitfield struct layout
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Sep 18 08:04:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87344
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ABI
Target| |x86_64-*-*, i?86-*-*
CC|rguenth at gcc dot gnu.org |
Component|c |target
Summary|archival/libarchive/decompr |archival/libarchive/decompr
|ess_gunzip.c:1139:2: error: |ess_gunzip.c:1139:2: error:
|size of unnamed array is |size of unnamed array is
|negative |negative, -mms-bitfields
| |influences non-bitfield
| |struct layout
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
It's -mms-bitfields which appearantly influences layout of the following
struct:
union {
unsigned char raw[8];
struct {
uint8_t gz_method;
uint8_t flags;
uint32_t mtime;
uint8_t xtra_flags_UNUSED;
uint8_t os_flags_UNUSED;
} __attribute__ ((__packed__)) formatted;
} header;
((void)sizeof(char[1 - 2*!!(sizeof(header) != 8)]));
Not sure if the difference is intended.
More information about the Gcc-bugs
mailing list