Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Question about platform independent code and ANSI C compliant code
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Richard Heathfield  
View profile  
 More options Jun 3 2010, 6:50 am
Newsgroups: comp.programming
From: Richard Heathfield <r...@see.sig.invalid>
Date: Thu, 03 Jun 2010 11:50:35 +0100
Local: Thurs, Jun 3 2010 6:50 am
Subject: Re: Question about platform independent code and ANSI C compliant code
bart.c wrote:

<snip>

> It seems reasonable to be able to request 'a' to be exactly 16-bits on
> any machine, whether that is natural for the architecture on not.

I'm not entirely convinced that that /is/ a reasonable request. It is
perfectly reasonable to ask for it to be *at least* 16 bits.

How, precisely, would you implement your exactly-16-bit type on a
machine whose natural word size is 64? Such a machine does exist, and C
implementations for it have to jump through all kinds of crazy hoops to
give programmers the 8-bit char they expect. I would not like to be the
one to tell the compiler team "well done lads, but now there's this
bloke on Usenet who wants 16-bit short ints..."

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
"Usenet is a strange place" - dmr 29 July 1999
Sig line vacant - apply within


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.