Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: kan.liu.229 at gmail dot com
Target Milestone: ---
Created attachment 46079
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46079&action=edit
possible fix
in gc
iority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: kan.liu.229 at gmail dot com
overflow may occur when using a number whose size exceeds sizeof(unsigned) in
chrono_literals. Because the parse classes in include/bits/parse_number.h just
use *unsigned*
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61166
--- Comment #3 from Kan Liu ---
(In reply to emsr from comment #2)
> Created attachment 32789 [details]
> Patch to parse_nmber to make it unsigned long long all over.
>
> Works on x86_64-linux.
Yeah, it works. Thank you!
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61166
--- Comment #4 from Kan Liu ---
btw, is it really necessary to use functionality in parse_number.h to parse
manually? What *parse_number* has done is no more than the general
*operator""(unsigned long long)*, and it just enables *0b* and *0B* pre
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61166
--- Comment #7 from Kan Liu ---
(In reply to emsr from comment #6)
> Something like parse_number was in the original doc as an implementation
> example. The idea was to select the smallest integral type that could
> accommodate the number string
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61166
--- Comment #10 from Kan Liu ---
(In reply to Jonathan Wakely from comment #9)
> I can see one good reason to implement those operators as templates: it
> allows us to check if the literal value overflows the duration::rep type,
> which is requir
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61166
--- Comment #12 from Kan Liu ---
(In reply to Jonathan Wakely from comment #11)
> (In reply to Kan Liu from comment #10)
> > _Select_type already does the overflow check, so *template implemented
> > operators* is still redundant I think.
>
> Yo
minor
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: kan.liu.229 at gmail dot com
pop_heap uses __adjust_heap to percolate down the hole.
Inside __adjust_heap, it uses __value stores the value where was in position
__result(_