Illegal C in kaffe 1.0.b3

Petter Reinholdtsen pere at hungry.com
Wed Jan 6 05:16:05 PST 1999


I get the following message (for each array) when using the native C
compiler on Irix 6.2.

cfe: Warning 654: ../../../include/Arrays.h, line 21: Must be an integer type greater than zero.
        unsigned int            length;         double                  align[0] ;
        ------------            -------         ------                  ------^
cfe: Error: ../../../include/Arrays.h, line 27: member cannot be of function or incomplete type.
 typedef struct { Hjava_lang_Object base; unsigned int          length;         double                  align[0] ; struct { jbyte body[1]; } data[1]; } HArrayOfBoolean;
 -----------------------------------------------------          -------         ------                  ^

I fixed this with a small patch.  Not sure if it the correct way to
handle this.

diff -ru src-1.0.b3/include/Arrays.h src-1.0.b3-sgi4i6/include/Arrays.h
--- src-1.0.b3/include/Arrays.h Wed Apr  1 00:37:32 1998
+++ src-1.0.b3-sgi4i6/include/Arrays.h  Wed Jan  6 14:08:48 1999
@@ -14,7 +14,7 @@
 
 #define ARRAY_FIELDS \
        unsigned int            length; \
-       double                  align[0]
+       double                  align[1]
 
 struct Array {
        Hjava_lang_Object       base;

It does not compile, but I have to simple fix for the new error:

gmake[3]: Entering directory `/d1/store/the_store/joseph/kaffe/src-1.0.b3-sgi4i6/libraries/clib/io'
cc -g  -I. -I../../../include -I./../../../include -I../../../config -I./../../../config  -c  AudioPlayer.c -o AudioPlayer.o
cfe: Error: /usr/include/stdlib.h, line 152: Syntax Error
 extern void *jmalloc((size_t)*( size_t)) ;
 ---------------------^
cfe: Warning 625: /usr/include/stdlib.h, line 152: Empty declaration
 extern void *jmalloc((size_t)*( size_t)) ;
 -----------------------------------------^

JFYI.
-- 
##>  Petter Reinholdtsen <##    | pere at td.org.uit.no
 O-  <SCRIPT Language="Javascript">window.close()</SCRIPT>
http://www.hungry.com/~pere/    | Go Mozilla, go! Go!



More information about the kaffe mailing list