chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] testcase -strict-types


From: Felix
Subject: Re: [Chicken-hackers] testcase -strict-types
Date: Fri, 29 Mar 2013 22:38:24 +0100 (CET)

From: Jörg F. Wittenberger <address@hidden>
Subject: [Chicken-hackers] testcase -strict-types
Date: 24 Mar 2013 21:00:30 +0100

> The attached code fails when compiled with -strict-types.
> 
> 
> $ csc -strict-types -verbose strcttps.scm /usr/bin/chicken
> strcttps.scm -output-file strcttps.c -strict-types -verbose
> 
> Note: in local procedure `doloop9',
>  in toplevel procedure `foo#bar':
>  (strcttps.scm:10) in procedure call to `null?', the predicate is
>  called with an argument of type
>  `null' and will always return true gcc strcttps.c -o strcttps.o -c
>  -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H
>  -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -I"/usr/include/chicken"
>  rm strcttps.c gcc strcttps.o -o strcttps -L"/usr/lib" -Wl,-R"/usr/lib"
>  -lchicken -lm -ldl rm strcttps.o $ ./strcttps gaga

Hello!

"-strict-types" should be considered experimental. It makes
assumptions about the use of types that are very easily violated by
normal Scheme code. That particular example you show here demonstrates
that very nicely. So my suggestion is not to use "-strict-types",
unless you have very heavy need for performance or are using
machine-generated code.


cheers,
felix



reply via email to

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