From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9BCF93892460; Thu, 17 Dec 2020 08:45:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9BCF93892460 From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug bootstrap/98340] gcc trunk build with clang failure, part 2 Date: Thu, 17 Dec 2020 08:45:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: bootstrap X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Dec 2020 08:45:52 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98340 --- Comment #3 from Jakub Jelinek --- Before r0-99643-g2defb926479247a61fe0fffbcf95597722a94c40 this used to be rejected with: pr98340.C: In member function =E2=80=98int uintset::hash::foo() [with T = =3D int]=E2=80=99: pr98340.C:33:18: instantiated from here pr98340.C:29:33: error: type =E2=80=98uintset=E2=80=99 is not a base t= ype for type =E2=80=98uintset::hash=E2=80=99 clang++ rejects the above testcase even if it is just struct traits {}; i.e. not derived from delete_ptr_hash , but accepts it if uintptr::hash isn't derived from hash_table but say hash_table (rejects if it is derived from hash_table::traits> though). I guess a C++ language lawyer would need to have a look if it is a clang++ = bug or g++ bug in accepting it. Of course, even if it is clang++ bug, a workar= ound is possible, e.g. it could use sizeof (T) rather than sizeof (uintset::valu= es), after all, when it multiplicates by n, I guess it wants sizeof (uintset::values[0]) anyway, because it uses trailing array of Ts rather than T[1]s.=