Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!decwrl!ads.com!potomac!jtn From: jtn@potomac.ads.com (John T. Nelson) Newsgroups: comp.sys.mac.programmer Subject: Re: THINK C 4.02 Init incompatibilities... Message-ID: <9086@potomac.ads.com> Date: 24 Aug 90 21:30:48 GMT References: <23788@dartvax.Dartmouth.EDU> Reply-To: jtn@potomac.UUCP (John T. Nelson) Organization: Advanced Decision Systems -- Arlington, Va Lines: 48 > Is there a list somewhere of the init that THINK C 4.0 has problems > with? I am experiencing some weird stuff that I think must be init > problems... > Thomas Summerall I seem to be having problems with void ** and the stack. A friend has problems with void * which are similar. Here's some example code: unsigned long symbol; char *word; functionA(word, &symbol) } functionA(char *w, unsigned long *symbol) { functionB(&symbol); /* value of symbol is garbage */ } functionB(void **symbol) { unsigned long *s; *s = 5; memmove(*symbol, s, sizeof(unsigned long)); } Something like the above. When we get to the above comment, the value of symbol is garbage. Strange thing is that this isn't ALWAYS true. Sometimes it works, sometimes it doesn't. Most times it does. Clearly there's a problem with the void ** or void * type. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 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 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=