Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/17/84 chuqui version 1.9 3/12/85; site unisoft.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!umcp-cs!gymble!lll-crg!dual!unisoft!pc From: pc@unisoft.UUCP (Paul Campbell) Newsgroups: net.micro.mac Subject: Megamax C Message-ID: <459@unisoft.UUCP> Date: Thu, 16-May-85 11:55:48 EDT Article-I.D.: unisoft.459 Posted: Thu May 16 11:55:48 1985 Date-Received: Fri, 17-May-85 06:22:10 EDT Distribution: net Organization: UniSoft Systems, Berkeley Lines: 44 I am posting this because of a bug in the Megamax C system that is very misleading. Hopefully other people can avoid the problems I had finding this. There are really two bugs, one masks the other and causes false error messages. Bug #1 goes like this static int fred(); static int (*fred_ptr)() = fred; /* .... name and faces removed to protect the innocent ... */ static int fred() { } this compiles without error (as it should) but when you link it it gives a message '(local) identifier not found fred', or something to that effect. So far so good ... this gives us a reasonable idea of the problem, and a fix, but read on ... Bug #2 make a module similar to the above, put it in a library and then try to link to it now you get a the same message but with a misleading routine name '(local) identifier not found $7', L$7 is the size of the local stack and is defined in a .equ in the library. Having compiled up a lot of code that uses just these constructs I have spent the last couple of weeks trying to figure out where the strange $n messages were coming from !! Paul Campbell ..!ucbvax!unisoft!paul