[net.micro.pc] Lattice vs. Microsoft 3.0

mo@seismo.CSS.GOV (Mike O'Dell) (08/29/85)

Both compilers are very good, but they both have serious lossages:

(1) Microsoft doesn't do pointer arithmetic for large model programs
	correctly - they only do the bottom 16 bits and then wave their
	hands about the segment part.  They do generate all the data
	segments needed (see next entry).

(2) Lattice does the pointer arithmetic correctly, but only generates one
	Data/BSS segment per program, causing problems with large
	programs having much initialized data.

There seems to be some kind of debate going on about whether C users will
tolerate the performance loss to do pointer arithmetic correctly.  Well,
as a person with a VERY large program which manipulates objects which
can potentially be larger than 64Kbytes, I would rather have the program
work right and slower, than chase down all the pointer adds which might
overflow and insert subroutine calls to do it correctly.  Lord knows
this later fixup slows it down.

	Wishing someone would do a compiler which does it right,
	-Mike O'Dell

brownc@utah-cs.UUCP (Eric C. Brown) (08/30/85)

In article <85@seismo.CSS.GOV> mo@seismo.CSS.GOV (Mike O'Dell) writes:
>Both compilers are very good, but they both have serious lossages:
>
>(1) Microsoft doesn't do pointer arithmetic for large model programs
>	correctly - they only do the bottom 16 bits and then wave their
>	hands about the segment part.  They do generate all the data
>	segments needed (see next entry).
>
>(2) Lattice does the pointer arithmetic correctly, but only generates one
>	Data/BSS segment per program, causing problems with large
>	programs having much initialized data.
>
Wizard C does it correctly.  The default for pointer arithmetic with 32 bit
pointers is to generate a subroutine call that adds the pointers correctly,
and they also support a 'huge' memory model that creates one data segment
per file.

Eric C. Brown
brownc@utah-cs
...!{seismo, decvax}!utah-cs!brownc

dan@gumby.UUCP (09/09/85)

> 
> There seems to be some kind of debate going on about whether C users will
> tolerate the performance loss to do pointer arithmetic correctly.  

No need for a debate.  Lattice has a compile-time switch that allows
you to choose how to do the pointer arithmetic:  Microsoft style, or
with full precision.

  -- Dan Frank