Article View: net.micro.mac
Article #1005Re: Consulair Mac C vs. Megamax C
From: TepperL
Date: Fri, 29 Mar 1985 19:29
Date: Fri, 29 Mar 1985 19:29
25 lines
1762 bytes
1762 bytes
I had an opportunity to look at the Megamax C manual. As I understood one
of the early chapters, sizeof(short) == 1. Is this really the case?
Could a bonafide Megamax user verify or refute this?
In particular, this would be a hassle if you wanted to port some programs
written for the UNIX C compilers for the PDP-11, VAX and other machines.
For those not familiar with these compilers, here's the story:
PDP-11 VAX IBM-370
sizeof(short) 2 2 2
sizeof(int) 2 4 4
sizeof(long) 4 4 4
In addition, I know there are a GAGGLE of 68000 C-compilers out there
for which sizeof(short) == 2. If you've written programs to run both
on the PDP-11 and on the VAX, it's a common practice to specifically
use short-ints for items requiring "about 16 bits". The same thing
applies for all those other 68000 C compilers.
Was this just a typo in the manual? Hope so. Yes, yes, I know that K&R
doesn't specifically prohibit such a small short-int. But if this is true,
there is a bunch of code that will require some heavy type-def'ing or cpp'ing
to port correctly just for this one compiler.
--
Larry Tepper {ihnp4 | allegra}!druxx!lat +1-303-538-1759
Technical Details
Message-ID:
<678@druxx.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!drutx!druxx!latReferences:
<7606@rochester.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site druxx.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!drutx!druxx!lat From: lat@druxx.UUCP (TepperL) Newsgroups: net.micro.mac Subject: Re: Consulair Mac C vs. Megamax C Message-ID: <678@druxx.UUCP> Date: Fri, 29-Mar-85 14:29:49 EST Article-I.D.: druxx.678 Posted: Fri Mar 29 14:29:49 1985 Date-Received: Sat, 30-Mar-85 01:34:12 EST References: <7606@rochester.UUCP> Organization: AT&T Information Systems Laboratories, Denver Lines: 25