Path: utzoo!attcan!uunet!ogicse!decwrl!ads.com!potomac!jtn From: jtn@potomac.ads.com (John T. Nelson) Newsgroups: comp.sys.mac.programmer Subject: Can THINK C support wider types than normal? Message-ID: <9216@potomac.ads.com> Date: 30 Sep 90 19:35:16 GMT Organization: Advanced Decision Systems, Arlington VA Lines: 35 I know that THINK C uses 16 bit wide fields to store its int's and 32 for longs, I have a piece of software, however, that would REALLY like to see 32-bit wide int's and the other types that Sun computers support. If THINK C can't accomodate longer types with some magic macro or switch then it means I'll have to redefine a LOT of code. There seem to be two schools of thought here.... 1. the 68000, has a 16-bit bus, so int should be 16 bits 2. the 68000 has 32 bit registers, so int should be 32 bits Type 1 compilers keep their stacks two-byte aligned; they push two bytes when passing an char or an int and four when passing a long. Type 2 compilers widen all parameters to four bytes. Type 1s have a performance advantage on 68000 and 68010, but their programs die if you pass a two-byte quantity to a function expecting a four byter. Type 2s are slow on 68000/010, but catch up on 68020 and above; they are also much more tolerant of char/short/int/long confusion. Any ideas? -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ORGANIZATION: Advanced Decision Systems GEOGRAPHIC: Arlington, VA UUCP: kzin!speaker@mimsy.umd.edu INTERNET: jtn@potomac.ads.com SPOKEN: Yo... John! PHONE: (703) 243-1611 PROJECT: The Conrail Locomotive/Harpsichord Fusion Program =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=