https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112467
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 <vector> $ clang++ -c a.cc In file included from a.cc:1: In file included from /<<NIX>>/gcc-14.0.0/include/c++/14.0.0/vector:67: /<<NIX>>/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#assume