A NOTE has been added to this issue. 
====================================================================== 
http://austingroupbugs.net/view.php?id=1108 
====================================================================== 
Reported By:                nsz
Assigned To:                
====================================================================== 
Project:                    1003.1(2016)/Issue7+TC2
Issue ID:                   1108
Category:                   Base Definitions and Headers
Type:                       Error
Severity:                   Editorial
Priority:                   normal
Status:                     Resolved
Name:                       Szabolcs Nagy 
Organization:               musl libc 
User Reference:              
Section:                    limits.h 
Page Number:                 
Line Number:                 
Interp Status:              --- 
Final Accepted Text:        http://austingroupbugs.net/view.php?id=1108#c4041 
Resolution:                 Accepted As Marked
Fixed in Version:           
====================================================================== 
Date Submitted:             2016-12-09 17:00 UTC
Last Modified:              2018-07-12 11:43 UTC
====================================================================== 
Summary:                    LONG_MIN must be <= -2147483648
====================================================================== 

---------------------------------------------------------------------- 
 (0004052) shware_systems (reporter) - 2018-07-12 11:43
 http://austingroupbugs.net/view.php?id=1108#c4052 
---------------------------------------------------------------------- 
Re: 4050: 
Those compilers are presuming it is required that -2^N is a trap
representation on all platforms, and are therefore only suitable for a
subset of C conforming platforms, as this is a reliance on undefined
behavior, from POSIX perspective. It only guarantees the behavior within
the limits *_MIN to *_MAX, not defines anything for values outside what has
been specified. The C standard leaves it implementation-defined, and to
clarify that ambiguity POSIX is, with this bug note, making it explicit
it's a non-trap value for a given bit-width to be aligned with the majority
of existing practice and other parts of the standards that require this.

This change does not really preclude those types of compilers, either, that
I see. A platform can have additional compilation environments that
document that this is what has been chosen as the C conforming behavior.
This change just affects the standard POSIX environments getconf is
required to report about and when _POSIX_C_SOURCE is defined. It was also
brought up that there could possibly be more compilation environments
defined, for trap and non-trap variants of 1s-complement and
sign-magnitude, but since only one known processor family makes use of
1s-complement in hardware, and none sign-magnitude or 2s-complement with
trap, this was not considered a priority. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2016-12-09 17:00 nsz            New Issue                                    
2016-12-09 17:00 nsz            Name                      => Szabolcs Nagy   
2016-12-09 17:00 nsz            Organization              => musl libc       
2016-12-09 17:00 nsz            Section                   => limits.h        
2016-12-09 18:40 EdSchouten     Note Added: 0003512                          
2016-12-09 22:25 nsz            Note Added: 0003513                          
2018-06-07 16:10 geoffclare     Note Added: 0004041                          
2018-06-07 16:11 geoffclare     Interp Status             => ---             
2018-06-07 16:11 geoffclare     Final Accepted Text       =>
http://austingroupbugs.net/view.php?id=1108#c4041    
2018-06-07 16:11 geoffclare     Status                   New => Resolved     
2018-06-07 16:11 geoffclare     Resolution               Open => Accepted As
Marked
2018-06-07 16:11 geoffclare     Tag Attached: issue8                         
2018-07-11 21:10 cmsmith        Note Added: 0004050                          
2018-07-12 08:13 geoffclare     Note Added: 0004051                          
2018-07-12 11:43 shware_systems Note Added: 0004052                          
======================================================================


Reply via email to