public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "slyfox at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-112467-4@http.gcc.gnu.org/bugzilla/> (raw)

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

             reply	other threads:[~2023-11-09 19:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-09 19:38 slyfox at gcc dot gnu.org [this message]
2023-11-09 19:49 ` [Bug libstdc++/112467] " pinskia at gcc dot gnu.org
2023-11-09 19:49 ` slyfox at gcc dot gnu.org
2023-11-09 19:50 ` pinskia at gcc dot gnu.org
2023-11-09 21:15 ` redi at gcc dot gnu.org
2023-11-09 21:15 ` redi at gcc dot gnu.org
2023-11-10  8:26 ` rguenth at gcc dot gnu.org
2023-11-10 20:58 ` sjames at gcc dot gnu.org
2023-11-10 21:05 ` redi at gcc dot gnu.org
2023-11-11  0:58 ` cvs-commit at gcc dot gnu.org
2023-11-11  1:01 ` redi at gcc dot gnu.org
2024-02-09  8:46 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-112467-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).