Hi, sorry for the delayed response, I only just got back into the office. I've added the author of the patch to this email chain.
-----Original Message----- From: Abramo Bagnara [mailto:abramo.bagn...@bugseng.com] Sent: Sunday, August 5, 2018 5:03 AM To: Keane, Erich <erich.ke...@intel.com>; cfe-commits@lists.llvm.org Subject: Re: r338630 - [AST][1/4] Move the bit-fields from TagDecl, EnumDecl and RecordDecl into DeclContext Il 01/08/2018 22:48, Erich Keane via cfe-commits ha scritto: > Author: erichkeane > Date: Wed Aug 1 13:48:16 2018 > New Revision: 338630 > > URL: http://llvm.org/viewvc/llvm-project?rev=338630&view=rev > Log: > [AST][1/4] Move the bit-fields from TagDecl, EnumDecl and RecordDecl > into DeclContext > This commit break the build with gcc version 7.3-win32 20180312 (GCC). I've tracked the cause to the presence of: enum { ObjCMethodFamilyBitWidth = 4 }; between two bitfields declarations. Moving it to begin of class fix the build. This is spotted only because the static_assert, so it is well possible there are other occurrences of the same problem. The following typescript show the issue: abramo@igor:/tmp$ cat bad.cc #include <cstdint> enum { NumDeclContextBits = 13 }; class ObjCMethodDeclBitfields { uint64_t : NumDeclContextBits; enum { ObjCMethodFamilyBitWidth = 4 }; mutable uint64_t Family : ObjCMethodFamilyBitWidth; uint64_t IsInstance : 1; uint64_t IsVariadic : 1; uint64_t IsPropertyAccessor : 1; uint64_t IsDefined : 1; uint64_t IsRedeclaration : 1; mutable uint64_t HasRedeclaration : 1; uint64_t DeclImplementation : 2; uint64_t objcDeclQualifier : 7; uint64_t RelatedResultType : 1; uint64_t SelLocsKind : 2; uint64_t IsOverriding : 1; uint64_t HasSkippedBody : 1; }; static_assert(sizeof(ObjCMethodDeclBitfields) <= 8, "ObjCMethodDeclBitfields is larger than 8 bytes!"); abramo@igor:/tmp$ x86_64-w64-mingw32-g++ -c bad.cc bad.cc:20:1: error: static assertion failed: ObjCMethodDeclBitfields is larger than 8 bytes! static_assert(sizeof(ObjCMethodDeclBitfields) <= 8, ^~~~~~~~~~~~~ 1|abramo@igor:/tmp$ cat good.cc #include <cstdint> enum { NumDeclContextBits = 13 }; class ObjCMethodDeclBitfields { enum { ObjCMethodFamilyBitWidth = 4 }; uint64_t : NumDeclContextBits; mutable uint64_t Family : ObjCMethodFamilyBitWidth; uint64_t IsInstance : 1; uint64_t IsVariadic : 1; uint64_t IsPropertyAccessor : 1; uint64_t IsDefined : 1; uint64_t IsRedeclaration : 1; mutable uint64_t HasRedeclaration : 1; uint64_t DeclImplementation : 2; uint64_t objcDeclQualifier : 7; uint64_t RelatedResultType : 1; uint64_t SelLocsKind : 2; uint64_t IsOverriding : 1; uint64_t HasSkippedBody : 1; }; static_assert(sizeof(ObjCMethodDeclBitfields) <= 8, "ObjCMethodDeclBitfields is larger than 8 bytes!"); abramo@igor:/tmp$ x86_64-w64-mingw32-g++ -c good.cc abramo@igor:/tmp$ -- Abramo Bagnara BUGSENG srl - http://bugseng.com mailto:abramo.bagn...@bugseng.com _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits