Index: [thread] [date] [subject] [author]
  From: Marcus Sundberg <mackan@stacken.kth.se>
  To  : ggi-develop@eskimo.com
  Date: Mon, 21 Sep 1998 04:54:49 +0200

Re: Digital Unix God doesn't like Andy doing magic in his dungeons?

becka@rz.uni-duesseldorf.de wrote:
> 
> Hi !
> 
> > The visual.c of the sub target causes a sig11 in gcc on Digital
> > Unix if you compile it with -Wall.
> 
> ?? The compiler fails on -Wall ? Hmm as DUX likes weird flags, maybe
> -Wall means "hit the wall" ? :-)
> 
> > And since Andy added the shared memory stuff, the visual.c of the
> > memory target causes the same thing.
> 
> Uh - this is bad. Could you investigate this ? Putting #if 0 in and out
> around my shmem code to see what causes it and maybe how to fix it ?

Found it! It wasn't the shm-code, it was this line:
sscanf(args,"%p",&(MEMLIB_PRIV(vis)->memptr));
and the equivalent sscanf in the sub target that triggers some weird
bug in gcc. (Todd Fries has the same behaviour on OpenBSD)

This seems to be the only way to get it working...

	/* Hack to work around a bug in gcc 2.8.1 */
	{
		void *tmpptr = subinfo->parent;
		sscanf(args,"%p",&tmpptr);
		subinfo->parent = tmpptr;
	}

//Marcus
-- 
-------------------------------+------------------------------------
        Marcus Sundberg        | http://www.stacken.kth.se/~mackan
 Royal Institute of Technology |       Phone: +46 707 295404
       Stockholm, Sweden       |   E-Mail: mackan@stacken.kth.se

Index: [thread] [date] [subject] [author]