[comp.sys.amiga.tech] Lattice 5.04 prototyping broken?

evan@cs.mu.OZ.AU (Evan Harris) (10/31/89)

Has anyone managed to get the prototyping options (-pr) to the 5.04
version of lc1b to work?

The following code:

void
foo(bar)
char	bar;
{
	/* anything at all in here */
}

gurus for me with an address error (well, actually the guru's caught
by catch.o).

It works perfectly under 5.02.

# Evan Harris                #  Dept. of Computer Science  #
# evan@cs.mu.oz.au           # The University of Melbourne #
# ...!uunet!cs.mu.oz.au!evan #          Australia          #

amercer@thor.wright.edu (Art Mercer) (11/02/89)

From article <EVAN.89Oct31210657@munginya.cs.mu.OZ.AU>, by evan@cs.mu.OZ.AU (Evan Harris):
>> 
>> Has anyone managed to get the prototyping options (-pr) to the 5.04
>> version of lc1b to work?

Nope, its really broken.  I reported it to Lattice on Oct 29th, they said
a bug report would be filed.  With Lattice's good support a patch should
not be far off.

>> 
>> # Evan Harris                #  Dept. of Computer Science  #
>> # evan@cs.mu.oz.au           # The University of Melbourne #
>> # ...!uunet!cs.mu.oz.au!evan #          Australia          #


Art Mercer
Associate Director, Academic Computing Resources
Wright State University
Dayton, OH 45435
BITNET:  amercer@wsu.bitnet

walker@sas.UUCP (Doug Walker) (11/03/89)

In article <EVAN.89Oct31210657@munginya.cs.mu.OZ.AU> evan@cs.mu.oz.au writes:
>
>Has anyone managed to get the prototyping options (-pr) to the 5.04
>version of lc1b to work?
>

-pr is horribly broken in 5.04 due to some last-minute 'fixes'.  (Actually,
we just wanted to demonstrate a SnapShot GURU...)   It's really too bad, 
because there are lots of good fixes to the -pr stuff that now can't be
used due to one stupid little problem.

For now, please use the lc1b from 5.02 to get around the problem.  
Apologies all around (sigh).

While I'm on the subject, there is a bug in the new -cq option reported
on BIX:

If you have

struct FOO
{
   struct BAR bar;
   ..other stuff..
};

struct FARKLE
{
   struct FOO foo;
   ...other stuff..
};

void foo(struct FOO *);

-cq is SUPPOSED to allow you to pass a struct FARKLE * to foo() without
complaining about the prototype mismatch.  Unfortunately, there is a
bug when the first element of the common structure (FOO) is itself a
structure;  in this case, the comparison still fails.  This happens
if you try to substitute an IntuiMessage structure for a Message structure,
which of course was one of the major reasons for implementing -cq.

The other major reason was to be able to accept IoSerRequest's and other
IO request blocks when the prototype says IoStdReq;  this does still
work, since the first element of an IoSerReq (and other like it) is
not actually an IoStdReq structure but rather matches an IoStdReq
structure field for field.  So -cq does provide some benefit.

Sorry for the problems.  Please report any additional problems you find
to Lattice tech support at 312-916-1100  (FAX 312-916-1190) so they can
be fixed in a future update.