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 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: <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> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit 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 >>> >>> 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 , , , , , , , , and . 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.