Austin Group Defect Tracker

Aardvark Mark IV


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0001177 [1003.1(2016/18)/Issue7+TC2] Base Definitions and Headers Objection Error 2017-12-16 05:26 2019-02-14 17:07
Reporter shware_systems View Status public  
Assigned To
Priority normal Resolution Duplicate  
Status Closed  
Name Mark Ziegast
Organization SHware Systems Dev.
User Reference
Section XBD 13, <stdint.h>
Page Number 348
Line Number 11817-8
Interp Status ---
Final Accepted Text
Summary 0001177: Misstated permitted limits on signed types
Description The 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 Action Delete 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.
Tags No tags attached.
Attached Files

- Relationships
duplicate of 0001108Applied LONG_MIN must be <= -2147483648 

-  Notes
(0004251)
nick (manager)
2019-02-14 17:04

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


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker