CHAR_MIN and CHAR_MAX do not have defined typesAuthors: Jay Ghiron
Date: 2026-11-27
Submitted against: C23
Status: Open
Cross-references: 1133
If an object of type
charcan hold negative values, the value ofCHAR_MINshall be the same as that ofSCHAR_MINand the value ofCHAR_MAXshall be the same as that ofSCHAR_MAX. Otherwise, the value ofCHAR_MINshall be 0 and the value ofCHAR_MAXshall be the same as that ofUCHAR_MAX(see 6.2.5.).
(C23 5.3.5.3.2 "Characteristics of integer types <limits.h>" paragraph 4.)
This paragraph only defines the values of CHAR_MIN and CHAR_MAX,
but it never defines their types. Before C23 their types were defined
as the promoted type of char, I assume it was not the intent to
remove the definition of their types.
Modify C23 5.3.5.3.2 paragraph 4:
If an object of type
charcan hold negative values, the value and the type ofCHAR_MINshall be the same as that ofSCHAR_MINand the value and the type ofCHAR_MAXshall be the same as that ofSCHAR_MAX. Otherwise, the value ofCHAR_MINshall be 0 while the type ofCHAR_MINshall be the same as that ofUCHAR_MAX, and the value and the type ofCHAR_MAXshall be the same as that ofUCHAR_MAX(see 6.2.5.).
Note: This suggested correction does not interfere with the changes suggested in issue 1133.