[Ecls-list] compile-file-pathname bug

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Sat May 16 19:53:05 UTC 2009

On Wed, May 13, 2009 at 1:28 AM, Gabriel Dos Reis <gdr at cs.tamu.edu> wrote:
> Hi,
>  I believe ECL has a bug in its implementation of compile-file-pathname.
> More specifically, my reading of the CL spec suggests that the form
>   (compile-file-pathname "foo.lisp" :output-file "foo.fas-tmp")
> should yield a pathname P#"foo.fas-tmp".  However, ECL produces
> P#"foo.fas".  I think that violates the CL spec.

I am afraid that you are imposing some interpretation onto the
specification. ECL is self consistent. The definition of
compile-file-pathname says "Returns the pathname that compile-file
would write into, if given the same arguments.", while the definition
of compile-file says "output-file can be used to specify an output
pathname; the actual pathname of the compiled file to which compiled
code will be output is computed as if by calling
compile-file-pathname. "

There is a historical reason for ECL not honoring your choice of
output file which is that the user's choice of file extensions might
not be appropriate: if you specify a file extension that ECL does not
understand as binary it will refuse to load your file.

Now the question is, should I really apply the change?


Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28009 (Spain)

More information about the ecl-devel mailing list