public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/107902] New: std::sort isn't usable on 16-bit targets
@ 2022-11-28 21:17 redi at gcc dot gnu.org
0 siblings, 0 replies; only message in thread
From: redi at gcc dot gnu.org @ 2022-11-28 21:17 UTC (permalink / raw)
To: gcc-bugs
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.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-28 21:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-28 21:17 [Bug libstdc++/107902] New: std::sort isn't usable on 16-bit targets redi at gcc dot gnu.org
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).