From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E0C62385703C; Thu, 9 Nov 2023 19:38:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E0C62385703C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1699558732; bh=EmJdpdtknxcolcz+xNSGL0lgJ0SR7xqC9pchi8yj2WI=; h=From:To:Subject:Date:From; b=dhNOnmLPv+W9atDk8cW9cfzBHol47w3RWx+vNolsNBSzjVXRTAVjYmDzn7MsIVdE9 QkkbtesgQk8C0L7i9IEsyvlemcbVhWWjDV2w4tPJhZPSsYVJcBhoJSQ1eR/KsgNMDa ck38kHyJlF3kyG5WtoJuml6MYHUNMkox9Y35nRDo= From: "slyfox at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/112467] New: [14 Regression] libstdc++ fails to build on clang: bits/stl_bvector.h:189:23: error: '__assume__' attribute cannot be applied to a statement Date: Thu, 09 Nov 2023 19:38:52 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: slyfox 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112467 Bug ID: 112467 Summary: [14 Regression] libstdc++ fails to build on clang: bits/stl_bvector.h:189:23: error: '__assume__' attribute cannot be applied to a statement Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: slyfox at gcc dot gnu.org Target Milestone: --- Build failure is probably introduced by r14-5260-ge39b3e02c27bd7 and fails = on clang-16 as: // $ cat a.cc #include $ clang++ -c a.cc In file included from a.cc:1: In file included from /<>/gcc-14.0.0/include/c++/14.0.0/vector:67: /<>/gcc-14.0.0/include/c++/14.0.0/bits/stl_bvector.h:189:23: error: '__assume__' attribute cannot be applied to a statement __attribute__ ((__assume__ (__ofst < unsigned(_S_word_bit)))); ^ ~ 1 error generated. I think it happens because `clang` implements different `assume` attribute compared to `gcc`: https://clang.llvm.org/docs/AttributeReference.html#assu= me=