On 2021-05-16 11:09:38 -0700, David G. Johnston wrote:
> On Sunday, May 16, 2021, Condor <con...@stz-bg.com> wrote:
> 
> 
>          new_time = fromtime * 1000; -- here is line 19
>          
> 
> 
> An integer times an integer results in an integer.  Period.  Neither fromtime
> nor new_time have been assigned to yet, the in-memory result of the 
> computation
> is only allocated integer bits and if you overflow that you get an error.

This is also true in C, btw, except that in C an overflow of a signed
int is undefined behaviour while an unsigned int is required to wrap
around.

        hp

-- 
   _  | Peter J. Holzer    | Story must make more sense than reality.
|_|_) |                    |
| |   | h...@hjp.at         |    -- Charles Stross, "Creative writing
__/   | http://www.hjp.at/ |       challenge!"

Attachment: signature.asc
Description: PGP signature

Reply via email to