[A86] Re: SDCC v2.3.0


[Prev][Next][Index][Thread]

[A86] Re: SDCC v2.3.0





On Tue, 16 Oct 2001 20:22:14 +0200 "Henk Poley" <HPoley@DDS.nl> writes:
> > Inlining *can* be done to some degree in the preprocessor, and if 
> > you're
> > just using the language to structure the program, that might be
> > sufficient.
> Something like this could be done 'inline', but wouldn't that just 
> be some
> sort of macro then?

Yeah...  I'm not sure what you're saying here.  In my understanding,
inline functions are basically "smart" macros that keep track of scoping
and such.

The problems with using macros instead of real inline functions are in
places like this:

inline int min(a,b) { return (a<b)?a:b; }   /* or #define min(a,b) ... */
a = min(i++, j);

which becomes:  a = (i++<j)?i++:j;
and i may get incremented twice, whereas with real inline functions it
doesn't.  I think it's likely there're always fancy tricks to get around
this tho.

Where I see inlining being used is more in places like:
void puts(char*str) { asm { ld hl,str \ call _puts } }
and all you need is to copy the contents in place and run an optimizer
over it.
(puts is a bad example, something more like findsym would be better, but
more complicated)

> MS make isn't (fully) compatible to GNU make, as far as I know. And 

Probably not, does it matter?  The make (or make-like routine...) with
AsmStudio probably isn't either.

> I don't have/use MS Visual C(++).

I expect that's probably quite common, which is a problem.
I'm too lazy, does the make with http://unxutils.sourceforge.net/ work? 
It's a native win32 compile.  (I'm using flex & bison out of that set
atm, no cygwin!)

-josh
________________________________________________________________
GET INTERNET ACCESS FROM JUNO!
Juno offers FREE or PREMIUM Internet access for less!
Join Juno today!  For your FREE software, visit:
http://dl.www.juno.com/get/web/.




Follow-Ups: