[net.micro.pc] Warning regarding LATTICE Compiler

greenber@timeinc.UUCP (Ross M. Greenberg) (08/17/85)

When I upgraded to Lattice 2.15, suddenly some of my code broke.  All
seems to boil down to confusion for define macros:

#define macro  (char *)((long)ptr1 - (long)ptr2)

	function ((long)macro);

(Don't ask why --- you wouldn't believe the project!!)

ended up that I had to change the macro to read:

#define macro	((char *)((long)ptr1 - (long)ptr2))

Notice the extra set of parens (probably a good idea anyway!).

Maybe a new heading:  How has Lattice bitten you?

-- 
------------------------------------------------------------------
Ross M. Greenberg  @ Time Inc, New York 
              --------->{vax135 | ihnp4}!timeinc!greenber<---------

I highly doubt that Time Inc.  would make me their spokesperson.
---

peter@baylor.UUCP (Peter da Silva) (08/21/85)

> #define macro  (char *)((long)ptr1 - (long)ptr2)
> 
> 	function ((long)macro);

Yeh. I don't think that (long)(char *)(...) is going to be terribly
portable in the first place. Just looking at it makes me shudder.

> Maybe a new heading:  How has Lattice bitten you?

When I try to use intdos(...) to call search_first and search_next in
_main (trying to do command line expansion of wildcards), it breaks
stdio. I tried it from assembly, through intdos, and even through CTOOLS.
I don't know why it breaks stdio, but it does. Maybe someone who has
succeeded in doing this can help.
-- 
	Peter (Made in Australia) da Silva
		UUCP: ...!shell!neuro1!{hyd-ptd,baylor,datafac}!peter
		MCI: PDASILVA; CIS: 70216,1076