[ On Fri, September 22, 1995 at 10:15:38 (MDT), Frank Ridderbusch wrote: ]
> Subject: Re: STk 2.2 is out!
>
> As it turns out, it seems that there is a compiler dependency. I took
> the time and recompiled everything with GCC 2.6.2 and voila, it works
> (as was hinted in another message). I seems, that this dependency was
> introduced sometime during version STk 2.1.2 or 2.1.3. Since that
> time, I couldn't build with my system compiler. Before that, I never
> had this kind of problems.
Yikes! That's very scary!
I didn't see anything in the code I've been browsing through that would
normally cause problems with compiler differences, and I think it's
extrememly weird to find such a difference between GCC-2.6.2 and any
other ANSI-C compiler (I assume you're using Sun's new ANSI compiler on
Solaris-2?).
> This is the first time on my plattform, that I experienced different
> results for GCC and my system compiler.
Interesting indeed. I'd sure like to find out what kind of construct
causes such problems so that it can be either weeded out (I hope it's
just bad coding), or reported to compiler vendors so they fix their
problems....
It's a very interesting problem though.
Here's how I can trigger the bug interactively:
ttyp7:<woods_at_most> $ stk
Welcome to the STk interpreter version 2.2 [SunOS-4.1.1_U1-sun3]
Copyright (C) 1993,1994,1995 Erick Gallesio - I3S - CNRS / ESSI <eg_at_unice.fr>
STk> (require "Basics")
*** Error at line 84 of file /local/lib/stk/2.2/STk/Basics.stk:
bad Scheme name (setter background)
STk>
Here's the contents of the stack window after the above:
(error "bad Scheme name ~S" l)
(let ((name (build-scheme-name name))) (quasiquote (begin (unless (and (symbol-bound? (quote (unquote name))) (is-a? (unquote name) <generic>)) (def ...
(%replace params (apply (lambda (name args . body) (let ((name (build-scheme-name name))) (quasiquote (begin (unless (and (symbol-bound? (quote (unq ...
(define-method (setter background) ((self #[<tk-metaclass> <tk-simple-widget>]) v) (slot-set! self (quote background) v))
(eval (quasiquote (begin (define-method (unquote accessor-name) ((self (unquote class))) (slot-ref self (quote (unquote (car s))))) (define-method ( ...
(for-each (lambda (s) (if (pair? s) (let ((accessor-name (get-keyword :accessor (cdr s) #f))) (if accessor-name (eval (quasiquote (begin (define-met ...
(next-method)
(initialize instance initargs)
(let ((instance (allocate-instance class initargs))) (initialize instance initargs) instance)
(make-instance class initargs)
(%syntax-define <tk-simple-widget> (make (or <tk-metaclass> #[<class> <class>]) :dsupers (list <tk-widget>) :slots (quote ((background :accessor bac ...
(load what)
(begin (load what) (if (not (member what provided)) (begin (format #t "WARNING: ~S was not provided~%" what))))
(require "Basics")
The function that's failing is:
(define (build-scheme-name l)
(cond
((and (list? l) (= (length l) 2) (eq? (car l) 'setter))
(string->symbol (format #f "the setter of ~A" (cadr l))))
((symbol? l)
l)
(else
(error "bad Scheme name ~S" l))))
Now this is very interesting, if my Scheme isn't too broken, and may be
related to what's going on:
ttyp7:<woods_at_most> $ stk
Welcome to the STk interpreter version 2.2 [SunOS-4.1.1_U1-sun3]
Copyright (C) 1993,1994,1995 Erick Gallesio - I3S - CNRS / ESSI <eg_at_unice.fr>
STk> (define (test-name l)
(and (list? l) (= (length l) 2) (eq? (car l) 'setter)))
#[undefined]
STk> (test-name '(setter background))
#f
STk> (test-name `(setter background))
#f
STk> (list 'setter 'background)
(setter background)
STk> (test-name (list 'setter 'background))
#f
STk>
Can anyone tell me if I'm doing something stupid, or if this should work?
Oh! More clues:
STk> (= (length (list 'setter 'background)) 2)
#f
STk> (length (list 'setter 'background))
1073741824
STk>
this definitely looks wrong.
STk> (length '())
0
STk> (length '(1))
1072693248
STk> (length '(1 2))
1073741824
STk> (length '(1 2 3 4 5 6 7 8 9 10))
1076101120
STk>
Yup, I think I've found the culprit!
Now, to fix it....
--
Greg A. Woods
+1 416 443-1734 VE3TCP robohack!woods
Planix, Inc. <woods_at_planix.com>; Secrets of the Weird <woods_at_weird.com>
Received on Fri Sep 22 1995 - 16:37:32 CEST