Subject: [clisp-list] compiler warnings

From: "Coby Beck" <[email-masked]>
Date: Mon Oct 14 17:51:03 2002

Hello List...

I am working on a system of files that compile with no warnings in Lispworks
but a whole slew of "undefined function" warnings in clisp due to the order
of definitions within the same files.

I prefer Lispworks' behaviour about that, can I have it?  Is there a flag
about warnings I can set somewhere?  Also, what are the other implications
about the compiler giving me what I am asking for, ie will I then miss out
on important warnings?

As far as I can tell, the only other alternative is to rearrange all of my
functions :( and change the way I like to organise my code in general :((

Advice appreciated!  Thanks...

Coby Beck
(remove #\Space "coby 101 @ bigpond . com")

PS.  I tried to search the archives but had no luck, as in nothing came back
at all, sorry if it is a FAQ
PPS. Directions to FAQ's or search interfaces greatly appreciated, this is
my first time using this list

---

From: Sam Steingold <[email-masked]>
Date: Mon Oct 14 18:59:03 2002

> * In message <00cd01c273e4$d7aa5fc0$1b01a8c0@localnet>
> * On the subject of "[clisp-list] compiler warnings"
> * Sent on Tue, 15 Oct 2002 11:50:22 +1100
> * Honorable "Coby Beck" <[email-masked]> writes:
>
> I am working on a system of files that compile with no warnings in
> Lispworks but a whole slew of "undefined function" warnings in clisp
> due to the order of definitions within the same files.

what CLISP version are you using?
this does not happen for me in the latest CLISP:
$ clisp -q -norc -c zot.lisp 

Compiling file /usr/local/src/clisp/bugs/zot.lisp ...

Compilation of file /usr/local/src/clisp/bugs/zot.lisp is finished.
0 errors, 0 warnings
$ cat zot.lisp 
(defun foo (x) (bar x))
(defun bar (x) x)
$

> PPS. Directions to FAQ's or search interfaces greatly appreciated,
> this is my first time using this list

hmmm - how did you find out about this list?
Are you subscribed? (you should be - you cannot expect everyone to copy
you their replies, many will reply only to the list!)
All CLISP-related information (implementation notes, FAQ &c) can be
found at <http://clisp.cons.org>.

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat7.3 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
Your mouse has moved - WinNT has to be restarted for this to take effect.

---

From: "Coby Beck" <[email-masked]>
Date: Mon Oct 14 19:52:06 2002

----- Original Message -----
From: "Sam Steingold" <[email-masked]>
> $ clisp -q -norc -c zot.lisp

We are using 2.29

> Compilation of file /usr/local/src/clisp/bugs/zot.lisp is finished.

I tried loading the system directly from the clisp listener via a load file
and all went fine.  The problem still comes when the application is being
built via a script and clisp is being called like this:

 clisp -C -i <list of files> -x '(ext:saveinitmem)' && \

Are any of those flags responsible?  Anyway I will track down the author of
the script and see what the implications are about that call.

> hmmm - how did you find out about this list?

I knew it was there by c.l.l and a quick google took me to it.  I used a
search form on http://sourceforge.net/mailarchive/forum.php?forum=clisp-list
to see if others had asked the same.

> Are you subscribed?

I am.  How active is it?  (of course I will see for myself now)  Thanks for
the quick response!

Coby Beck

---

From: Sam Steingold <[email-masked]>
Date: Mon Oct 14 20:24:06 2002

> * In message <019401c273f5$d21d1be0$1b01a8c0@localnet>
> * On the subject of "Re: [clisp-list] compiler warnings"
> * Sent on Tue, 15 Oct 2002 13:51:54 +1100

Read The Fine Manual!
-C will cause the files loaded by -i to be compiled on the fly,
i.e., each form is compiled in its own compilation unit (see CLHS) -
this will cause the warnings!
-C is mostly for CLISP shell scripts, not for the real life.
you should either use defsystem (from CLOCC) or

a makefile like

%.fas: %.lisp
        clisp -c %<

%.mem: *.fas
        clisp -i $^ -x '(saveinitmem "$@")'

see also
<http://clisp.cons.org/impnotes/system.html#system-dict#require>
for information on how you can use REQUIE to simplify the make rules.

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat7.3 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
Single tasking: Just Say No.