From: Sam S. <sd...@gn...> - 2003-03-01 19:41:41
|
> * In message <116...@in...> > * On the subject of "MSVC build status of d to c translation" > * Sent on Sun, 2 Mar 2003 00:16:57 +1000 > * Honorable Arseny Slobodjuck <am...@in...> writes: > > I was able to build, link, make lispinit.mem and run testsuite in > VC C++ mode (I used fixed alignof = 4). cool! > BTW it seems very strange to me that it works with constant > alignof. As about alignof itself I just worked out such a warpy > method: > > template <class type> struct alignof_helper { char slot1; type slot2; }; > > #define a_lignof(var) (((char *)(&var.slot2)) - ((char *)&var)) > > template <class T> inline int al_ignof(T * param) { > alignof_helper<T> testvar; > return a_lignof(testvar); > } > > #define alignof(type) al_ignof((type *)0) > > > +s: it works. > -s: not with non-typedefed arrays, for example alignof(int[16]) won't > work. But it seems not needed. > > Two tests were failed but it must be unrelated. yes, they are unrelated. > excepsit.erg: fails the same way as it was with .d files (it is in my plan) > > Form: (PROGN (WITH-OPEN-FILE (S "./foo35.tmp" :DIRECTION :OUTPUT)) (DELETE-FILE "./foo35.tmp/bar")) > CORRECT: FILE-ERROR > CLISP : NIL this is weird - I thought I fixed this long ago! could you please find out why this fails? (assure_dir_exists() should error out but it does not) > strings.erg: > > Form: (LET ((S (MAKE-ARRAY 10 :ELEMENT-TYPE 'CHARACTER :INITIAL-ELEMENT #\a))) (LIST (MULTIPLE-VALUE-LIST (SYSTEM::STRING-INFO S)) (PROGN (SETF (AREF S 3) (CODE-CHAR 12345)) (MULTIPLE-VALUE-LIST (SYSTEM::STRING-INFO S))) (PROGN (GC) (MULTIPLE-VALUE-LIST (SYSTEM::STRING-INFO S))) (PROGN (SETF (AREF S 3) (CODE-CHAR 123456)) (MULTIPLE-VALUE-LIST (SYSTEM::STRING-INFO S))) (PROGN (GC) (MULTIPLE-VALUE-LIST (SYSTEM::STRING-INFO S))))) > CORRECT: ((8 NIL NIL) (16 NIL T) (16 NIL NIL) (32 NIL T) (32 NIL NIL)) > CLISP : ((8 NIL NIL) (16 NIL T) (16 NIL T) (32 NIL T) (32 NIL T)) this is platform independent: we need to make GC do un-realloc. see <http://clisp.cons.org/wanted.html#unrealloc> -- Sam Steingold (http://www.podval.org/~sds) running RedHat8 GNU/Linux <http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/> <http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html> Computers are like air conditioners: they don't work with open windows! |