Changeset 15a0f6f


Ignore:
Timestamp:
Jul 5, 2026, 11:25:53 PM (6 days ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
d0fbe2c
Parents:
9df6059
Message:

fix problem with printing 0 for largest int_128 values

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/iostream.cfa

    r9df6059 r15a0f6f  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon May  4 12:00:48 2026
    13 // Update Count     : 2310
     12// Last Modified On : Sat Jul  4 14:54:12 2026
     13// Update Count     : 2317
    1414//
    1515
     
    131131
    132132        static inline void base10_128( ostype & os, unsigned int128 val ) with ( basic_ostream_table ) {
    133                 #if defined(__GNUC__) && __GNUC_PREREQ(7,0)             // gcc version >= 7
    134                 if ( val > P10_UINT64 ) {
    135                 #else
    136                 if ( (uint64_t)(val >> 64) != 0 || (uint64_t)val > P10_UINT64 ) { // patch gcc 5 & 6 -O3 bug
    137                 #endif // __GNUC_PREREQ(7,0)
    138                         base10_128( os, val / P10_UINT64 );                     // recursive
     133//              if ( val > P10_UINT64 ) {
     134                if ( (uint64_t)(val >> 64) != 0 || (uint64_t)val > P10_UINT64 ) { // FIX ME: -O3 bug
     135                        base10_128( os, val / P10_UINT64 );                     // RECURSIVE
    139136                        fmt( os, "%.19lu", (uint64_t)(val % P10_UINT64) );
    140137                } else {
Note: See TracChangeset for help on using the changeset viewer.