Overview
| Artifact ID: | 66491bb3654602da44924deb20d8a77166874b268431700b9202f0daa50d25ad |
|---|---|
| Ticket: | 3d3124d01dabb46584e39877d44802bf5e8f4952
failures with -ftrapv compiler option |
| User & Date: | chrstphrchvz on 2023-08-15 07:41:07 |
Changes
- 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>[INT_MIN,INT_MIN+'0')</tt> which are the only values that would lead to overflow. The mystery remains.
- login: "chrstphrchvz"
- mimetype: "text/x-fossil-wiki"