[Aldor-l] Internal data types

pip88nl at gmail.com pip88nl at gmail.com
Fri Aug 15 11:47:35 EDT 2008


Stephen,

in the compiler code, there are many questionable choices of data types
for variables. One case is 'i' in 'jflowUltimateGotos' in of_jflow.c,
which is of type 'int'. Is this variable allowed to be negative? What are
the semantics of a negative 'i' in this place? I am hitting a bug
(possibly my own) where the third loop in that function is endless. If i
cannot be negative, I would like to assert its positivity so instead of
hanging up, the compiler dies.

In order to hang it, I use bug1066.as and compile it like this:

  aldor -Q3 -Qinline-all -Wcheck -Qinline-limit:18 \
    -Mno-ALDOR_W_OverRideLibraryFile -Zdb -Iinclude \
    -fao -fmain -fc bug1066.as

Does this hang for anyone else?

Pippijn


----------- Here is my copy of bug1066.as, comments stripped -----------

#include "axllib"

Foo: with {
        foo: () -> %;
} == add {
        Rep == SingleInteger;
        import from Rep;

        foo(): % == {
                import from SingleInteger;
                y: Rep :=  1;
                for x in 1.. repeat y := y + 1;
                per y
        }
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://aldor.org/pipermail/aldor-l_aldor.org/attachments/20080815/bac11bfc/attachment.bin 


More information about the Aldor-l mailing list