View Issue Details

IDProjectCategoryView StatusLast Update
00011771003.1(2016/18)/Issue7+TC2Base Definitions and Headerspublic2019-02-14 17:07
Reportershware_systems Assigned To 
PrioritynormalSeverityObjectionTypeError
Status ClosedResolutionDuplicate 
NameMark Ziegast
OrganizationSHware Systems Dev.
User Reference
SectionXBD 13, <stdint.h>
Page Number348
Line Number11817-8
Interp Status---
Final Accepted Text
Summary0001177: Misstated permitted limits on signed types
DescriptionThe sentence:
An N-bit signed type has values in the range −2^(N−1) or 1−2^(N−1) to
2^(N−1)−1, while an N-bit unsigned type has values in the range 0 to 2^N−1.

is in error. Because POSIX requires int8, 16, and 32_t types be defined, for the least, fast, and built-in types to have equivalent ranges for the required compilation environments the 1-2^(N-1) limit is not permitted. That limit, while implied as usable by the C standard, is for environments that don't define the exact width types because they use -2^(N-1) as a trap value or as a negative zero.
Desired ActionDelete the sentence and append to Line 11814:
For the required compilation environments (Xref c99 Extended Description) an N-bit signed type has values in the range −2^(N−1) to 2^(N−1)−1, while an N-bit unsigned type has values in the range 0 to 2^N−1. An implementation may support additional compilation environments where the minimum value for a signed type may be 1-2^(N-1), but these shall not define via typedef the exact width types below.

and shade this CX, as it is an expression of behavior the C standard considers implementation-defined, per c99/c1x 6.2.6.2, par 2. This makes normative the Rationale assertions in <stdint.h> and XRAT A.3 that two's complement is required.
TagsNo tags attached.

Relationships

duplicate of 0001108 Closed LONG_MIN must be <= -2147483648 

Activities

nick

2019-02-14 17:04

manager   bugnote:0004251

Duplicate of 0001108

Issue History

Date Modified Username Field Change
2017-12-16 05:26 shware_systems New Issue
2017-12-16 05:26 shware_systems Name => Mark Ziegast
2017-12-16 05:26 shware_systems Organization => SHware Systems Dev.
2017-12-16 05:26 shware_systems Section => XBD 13, <stdint.h>
2017-12-16 05:26 shware_systems Page Number => 348
2017-12-16 05:26 shware_systems Line Number => 11817-8
2019-02-14 17:03 eblake Relationship added related to 0001108
2019-02-14 17:04 nick Interp Status => ---
2019-02-14 17:04 nick Note Added: 0004251
2019-02-14 17:04 nick Status New => Closed
2019-02-14 17:04 nick Resolution Open => Duplicate
2019-02-14 17:07 Don Cragun Relationship replaced duplicate of 0001108