delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2013/02/23/21:13:14

X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f
X-Recipient: djgpp-workers AT delorie DOT com
X-Cloudmark-SP-Filtered: true
X-Cloudmark-SP-Result: v=1.1 cv=YO+FcVZrxpdWV6Mo6AkY2Rtp7tuV51ZJEd1ZQZEmJbs= c=1 sm=1
a=scIU3uvjyNMA:10 a=BLceEmwcHowA:10 a=N659UExz7-8A:10
a=UPFP8Y/V6Sd71lvds57RNg==:17 a=7C3YNjtViKUlXhndTAMA:9 a=pILNOxqGKmIA:10
a=_RhRFcbxBZMA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117
Message-ID: <512976F4.5040901@SystematicSw.ab.ca>
Date: Sat, 23 Feb 2013 19:12:04 -0700
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Organization: Systematic Software
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7
MIME-Version: 1.0
To: djgpp-workers AT delorie DOT com
Subject: Re: inttypes.h r1.4
References: <CAA2C=vCOz-oFNsMG7QqxxqY+8f-Ztjh_TsEXnhUdYGGJeK9fYw AT mail DOT gmail DOT com> <5120F4BF DOT 9010807 AT gmx DOT de> <83halarkab DOT fsf AT gnu DOT org> <51217939 DOT 5090904 AT SystematicSw DOT ab DOT ca>
In-Reply-To: <51217939.5090904@SystematicSw.ab.ca>
Reply-To: djgpp-workers AT delorie DOT com

On 2013-02-17 17:43, Brian Inglis wrote:
> On 2013-02-17 09:13, Eli Zaretskii wrote:
>>> Date: Sun, 17 Feb 2013 16:18:23 +0100
>>> From: Juan Manuel Guerrero<juan DOT guerrero AT gmx DOT de>
>>>
>>> The only thing that must be cleared is if stdint.h shall be
>>> included before or after the "#ifndef __dj_ENFORCE_ANSI_FREESTANDING".
>>
>> After, of course. "Free standing" means without the library, so no
>> library components should be visible. Just look at all our headers,
>> and you will see that when __dj_ENFORCE_ANSI_FREESTANDING is defined,
>> the entire body of each header is skipped, which makes the header
>> files effectively empty for such a compilation.
>
> Architectural definitions are provided for a freestanding environment:
> C89 provided float.h limits.h stdarg.h stddef.h - I would expect
> stdint.h and inttypes.h to be provided - any one know what the standard
> says about stdint.h and inttypes.h?

ANSI online store has ISO/IEC 9899:2011 available as PDF for $30 as 
INCITS/ISO/IEC 9899-2012 Information technology — Programming
languages — C.

C&V: Standard states in clause "4. Conformance" para 6:
...A conforming freestanding implementation shall accept any strictly 
conforming program in which the use of the features specified in the 
library clause (clause 7) is confined to the contents of the standard 
headers <float.h>, <iso646.h>, <limits.h>, <stdalign.h>, <stdarg.h>, 
<stdbool.h>, <stddef.h>, <stdint.h>, and <stdnoreturn.h>.

So the architectural definitions provided in the headers above should be 
defined in both conforming hosted and freestanding implementations: i.e. 
omit "#ifndef __dj_ENFORCE_ANSI_FREESTANDING" from the above headers or 
place the definitions before and add a comment after that the 
definitions are available in both hosted and freestanding conforming 
implementations.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019