-----Original Message-----
 From: cctalk-bounces at 
classiccmp.org
 [mailto:cctalk-bounces at 
classiccmp.org] On Behalf Of Mouse
 Sent: 31 January 2012 16:37
 To: cctalk at 
classiccmp.org
 Subject: Re: C compilers and non-ASCII systems
    -spc (Or can I safely assume ASCII and
derivatives these days?) 
  
Please consider other character codes. An EBCDIC port of GCC is alive and
well on several of the "legacy" operating systems (MVS, VM and Music) that
run on the Hercules IBM 360/370/XA/390/z emulator. And whilst zLinux runs in
ASCII (or whatever it uses to get more than 256 points in a code page) many
zLinux sites also have the zVM hypervisor, which includes an optional EBCDIC
C compiler. Having ported the BREXX interpreter to this environment I was
stung by the fact that the original author had made assumptions about
character ordering that are not true on an EBCDIC platform.
  I would say you can assume ASCII (in the ASCII range)
in much
 the same sense you can assume pointers are just memory
 addresses: you are almost certain to get away with it...and
 eventually someone will end up cursing the assumption upon
 running into a case where it fails.
 Portability is not just about compatability with existing
 environments; it's also about compatability with future
 environments.  Just because no such system exists today -
 even if true - is no reason to play fast and loose with
 portability.  (An explicit decision to not even try to target
 certain systems can be, mind you, but that's not quite the
 same thing.  For example, I not infrequently write code that
 will break badly on 16-bit systems, not because I think they
 don't exist but because I don't care about them enough to
 consider it worth the bother to make my code handle them.)
 /~\ The ASCII                            Mouse
 \ / Ribbon Campaign
  X  Against HTML               mouse at 
rodents-montreal.org
 / \ Email!          7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B