This one looks like a bug. Let me see if it can be easily fixed.On Tue, Jun 16, 2015 at 3:16 AM, Kiwamu Okabe kiw...@debian.or.jp wrote:
Hi all,
Now I’m writing some code using gflist.
#include "share/atspre_define.hats" #include "share/atspre_staload.hats" staload "libats/SATS/ilist_prf.sats" staload "libats/SATS/gflist.sats" staload _ = "libats/DATS/gflist.dats" implement main0 () = { val (pf1 | xs1) = list2gflist ($list{int}(1, 2, 3)) val (pf2 | xs2) = list2gflist ($list{int}(4, 3, 2, 1)) val (pf_append | xs3) = gflist_append (xs1, xs2) }
However, the code has error on GCC side.
$ patscc test_gflist.dats -DATS_MEMALLOC_LIBC
In file included from test_gflist_dats.c:15:0:
test_gflist_dats.c: In function ‘loop_2__2__1’:
/home/kiwamu/src/ATS-Postiats/ccomp/runtime/pats_ccomp_instrset.h:260:35:
error: assignment to expression with array type
#define ATSINSmove(tmp, val) (tmp = val)
^
test_gflist_dats.c:910:1: note: in expansion of macro ‘ATSINSmove’
ATSINSmove(tmp10__1, ATSSELcon(arg0, postiats_tysum_0, atslab__0)) ;
^
/home/kiwamu/src/ATS-Postiats/ccomp/runtime/pats_ccomp_instrset.h:287:74:
warning: assignment makes integer from pointer without a cast
#define ATSINSstore_con1_ofs(tmp, tysum, lab, val) (((tysum*)(tmp))->lab
= val)
^
test_gflist_dats.c:939:1: note: in expansion of macro
‘ATSINSstore_con1_ofs’
ATSINSstore_con1_ofs(tmp12__1, postiats_tysum_3, atslab__0, tmp10__1) ;
^How to use gflist?
Thank’s,
Kiwamu Okabe at METASEPI DESIGN
–
You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/CAEvX6dmYKd5yV%2B2%2BFG%3DJXJ%2B31YFJj83863FCsoJrW0-CioXneg%40mail.gmail.com
.