[Top][All Lists]

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

Re: [Chicken-hackers] Half a bug report

From: Jörg F . Wittenberger
Subject: Re: [Chicken-hackers] Half a bug report
Date: 05 Jun 2012 23:11:34 +0200

On Jun 5 2012, Christian Kellermann wrote:

* Jörg F. Wittenberger <address@hidden> [120605 14:59]:
A chicken version from trunk as of 2012-02-10 did catch
the following error with ease.  My next update per 2012-05-12
did no longer.

So you have gotten a compiler error?

With master I get a runtime error only using the following code:

That's been my point: as soon as I remove enough of the actual
code to pin down the problem, everything is fine.

To be clear my timeline step wise:
1. new (May) compiler on bad complex source compiled without
  warning into bad code.  (Several compiler rebuilds
  and different machines.)
  [[Me so far no idea why.]]
2. Reverting to old (Feb) version gave immediately the warning
  about wrong parameter; not completing the compile.
3. Fixed the call both compilers produce good code.
  [[issue at hand solved now prepare the report]]
4. Try to boil the bad code into foo/bar -> hardly compiles
  until all "unrelated" stuff is removed.  Eventually all
  appears to be more related than hoped for.  Once short like
  that May compiler catch the error too.

$ cat t.scm
(receive (a b c) (values 1 2 3 4) (print a b c))

Ah, wait, that's wrong half.  I did:

(define (threeari+ x y z) (+ x y z))

((lambda (values a b c)
 (if <sometimes> (values 2 3) (values 1 2 3)))
threeari+ 'a 'b 'c)

Thus two calls with a symbol named "values" in operator
position (mentioning this because "values" might be likely
to have gotten a special handling by the compiler).
This values being bound to a well known procedure of fixed
arity.  One call is correct, one missing some parameter(s).

But don't aim chicken on the above example.  It works.
That is, it complains rightfully.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]