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++/107902] New: std::sort isn't usable on 16-bit targets Date: Mon, 28 Nov 2022 21:17:07 +0000 [thread overview] Message-ID: <bug-107902-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107902 Bug ID: 107902 Summary: std::sort isn't usable on 16-bit targets Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: rejects-valid Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org Target Milestone: --- /home/jwakely/src/gcc/build-16bit/msp430-elf/large/libstdc++-v3/include/bits/stl_algo.h:1948:42: error: call of overloaded '__lg(__gnu_cxx::__normal_iterator<std::chrono::time_zone*, std::vector<std::chrono::time_zone> >::difference_type)' is ambiguous 1948 | std::__lg(__last - __first) * 2, | ~~~~~~~~~^~~~~~~~~~~~~~~~~~ In file included from /home/jwakely/src/gcc/build-16bit/msp430-elf/large/libstdc++-v3/include/string:51, from /home/jwakely/src/gcc/build-16bit/msp430-elf/large/libstdc++-v3/include/chrono:44: /home/jwakely/src/gcc/build-16bit/msp430-elf/large/libstdc++-v3/include/bits/stl_algobase.h:1509:3: note: candidate: 'constexpr int std::__lg(int)' 1509 | __lg(int __n) | ^~~~ /home/jwakely/src/gcc/build-16bit/msp430-elf/large/libstdc++-v3/include/bits/stl_algobase.h:1513:3: note: candidate: 'constexpr unsigned int std::__lg(unsigned int)' 1513 | __lg(unsigned __n) | ^~~~ /home/jwakely/src/gcc/build-16bit/msp430-elf/large/libstdc++-v3/include/bits/stl_algobase.h:1517:3: note: candidate: 'constexpr long int std::__lg(long int)' 1517 | __lg(long __n) | ^~~~ /home/jwakely/src/gcc/build-16bit/msp430-elf/large/libstdc++-v3/include/bits/stl_algobase.h:1521:3: note: candidate: 'constexpr long unsigned int std::__lg(long unsigned int)' 1521 | __lg(unsigned long __n) | ^~~~ /home/jwakely/src/gcc/build-16bit/msp430-elf/large/libstdc++-v3/include/bits/stl_algobase.h:1525:3: note: candidate: 'constexpr long long int std::__lg(long long int)' 1525 | __lg(long long __n) | ^~~~ /home/jwakely/src/gcc/build-16bit/msp430-elf/large/libstdc++-v3/include/bits/stl_algobase.h:1529:3: note: candidate: 'constexpr long long unsigned int std::__lg(long long unsigned int)' 1529 | __lg(unsigned long long __n) | ^~~~ I think this is because ptrdiff_t is __int20 and there's no overload for that type.
reply other threads:[~2022-11-28 21:17 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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-107902-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: linkBe 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).