Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 66491bb3654602da44924deb20d8a77166874b268431700b9202f0daa50d25ad
Ticket: 3d3124d01dabb46584e39877d44802bf5e8f4952
failures with -ftrapv compiler option
User & Date: chrstphrchvz on 2023-08-15 07:41:07
Changes

  1. icomment:
    <blockquote>c - '0' only overflows when c < -0x50.</blockquote>
    
    Sorry, this is wrong. <tt>c - '0'</tt> cannot overflow at all, because <tt>'0'</tt> by itself is <tt>int</tt> which causes <tt>c</tt> to be promoted, and <tt>c</tt> regardless of signedness cannot be in the range <tt>&#91;INT_MIN,INT_MIN+'0')</tt> which are the only values that would lead to overflow. The mystery remains.
    
  2. login: "chrstphrchvz"
  3. mimetype: "text/x-fossil-wiki"