public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/107801] Building cross compiler for H8 family fails in libstdc++ (c++17/memory_resource.cc)
Date: Tue, 22 Nov 2022 09:08:40 +0000	[thread overview]
Message-ID: <bug-107801-4-D0vj1T3SrG@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107801-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107801

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2022-11-22

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Looks like your size_t is 32 bits though, which is why that code doesn't work.
On msp430-elf size_t is width 20, so those constants are not used.

This should fix it:

--- a/libstdc++-v3/src/c++17/memory_resource.cc
+++ b/libstdc++-v3/src/c++17/memory_resource.cc
@@ -876,9 +876,9 @@ namespace pmr
       1024, 1536,
       2048, 3072,
 #if __SIZE_WIDTH__ > 20
-      1<<12, 1<<13, 1<<14,
-      1<<15, 1<<16, 1<<17,
-      1<<20, 1<<21, 1<<22 // 4MB should be enough for anybody
+      1lu<<12, 1lu<<13, 1lu<<14,
+      1lu<<15, 1lu<<16, 1lu<<17,
+      1lu<<20, 1lu<<21, 1lu<<22 // 4MB should be enough for anybody
 #endif
 #endif
   };

  reply	other threads:[~2022-11-22  9:08 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-22  4:56 [Bug libstdc++/107801] New: " jdx at o2 dot pl
2022-11-22  9:08 ` redi at gcc dot gnu.org [this message]
2022-11-22  9:10 ` [Bug libstdc++/107801] " redi at gcc dot gnu.org
2022-11-22  9:20 ` redi at gcc dot gnu.org
2022-11-22 10:39 ` cvs-commit at gcc dot gnu.org
2022-11-22 11:06 ` cvs-commit at gcc dot gnu.org
2022-11-22 17:05 ` jdx at o2 dot pl
2022-11-22 17:09 ` redi at gcc dot gnu.org
2022-11-23  5:16 ` jdx at o2 dot pl
2022-11-26 21:41 ` pinskia at gcc dot gnu.org
2022-11-27  2:31 ` jdx at o2 dot pl
2022-11-27  7:35 ` redi at gcc dot gnu.org
2022-11-28 12:10 ` redi at gcc dot gnu.org
2022-11-28 13:32 ` redi at gcc dot gnu.org
2022-11-28 16:57 ` cvs-commit at gcc dot gnu.org
2022-11-28 17:01 ` redi at gcc dot gnu.org
2022-11-30  0:42 ` jdx at o2 dot pl
2022-11-30  1:48 ` redi at gcc dot gnu.org
2022-12-04 11:59 ` jdx at o2 dot pl
2023-05-16 12:50 ` cvs-commit at gcc dot gnu.org
2023-05-16 15:37 ` cvs-commit at gcc dot gnu.org
2023-05-16 16:16 ` cvs-commit at gcc dot gnu.org
2023-05-16 16:17 ` redi 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-107801-4-D0vj1T3SrG@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).