# New Ticket Created by  Andy Dougherty 
# Please include the string:  [perl #17533]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt2/Ticket/Display.html?id=17533 >


On Mon, 23 Sep 2002, H.Merijn Brand wrote:

> > > >         cd languages/perl6
> > > >         make

> HP-UX 11.00 w/ HP C-ANSI-C and perl-5.8.0+defined-or

> bison -v -y -d -o imcparser.c imcc.y
> imcc.y:439: warning: previous rule lacks an ending `;'
> imcc.y:613: warning: previous rule lacks an ending `;'

Probably just the obvious fix, but I didn't do anything about it.

> cc -Ae -DDEBUGGING -D_HPUX_SOURCE -Wl,+vnocompatwarnings
> -I/pro/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g
> -I../../include -Wall -Wno-unused -o imcparser.o -c imcparser.c

> cc: warning 422: Unknown option "-Wno-unused" ignored.

The makefile shouldn't unconditionally add those.  You're lucky it
only warned.  Solaris cc gave me a fatal error.

> cc: "imcc.y", line 431: error 1000: Unexpected symbol: "}".

There seem to be a lot of these.  I think this comes from a missing semicolon
at the end of a {} block.

After fixing those, the compile failed because my cc compiler doesn't
support 'inline'.  Temporary bandaid patch for *that* included as
well.  (A Configure probe is in order.)

Even after applying the patch below to at least let it compile, I
still get complete failure -- every perl6 test fails with something
like:

t/compiler/1........Can't bless non-reference value at
...../../assemble.pl line 163.
#     Failed test (t/compiler/1.t at line 7)
#          got: 'Parrot VM: Can't stat t/compiler/1_1.pbc, code 2.
# '
#     expected: 'Hello, world
# '

I haven't figured out why yet.


diff -r -u parrot-orig/config/gen/makefiles/imcc.in 
parrot-andy/config/gen/makefiles/imcc.in
--- parrot-orig/config/gen/makefiles/imcc.in    Mon Sep 23 14:05:17 2002
+++ parrot-andy/config/gen/makefiles/imcc.in    Mon Sep 23 14:49:54 2002
@@ -23,7 +23,7 @@
 #DO NOT ADD C COMPILER FLAGS HERE
 #Add them in Configure.pl--look for the
 #comment 'ADD C COMPILER FLAGS HERE'
-CFLAGS = ${ccflags} -I../../include -Wall -Wno-unused
+CFLAGS = ${ccflags} -I../../include
 
 C_LIBS = ${libs}
 
diff -r -u parrot-orig/languages/imcc/imcc.y parrot-andy/languages/imcc/imcc.y
--- parrot-orig/languages/imcc/imcc.y   Mon Sep 23 14:05:20 2002
+++ parrot-andy/languages/imcc/imcc.y   Mon Sep 23 14:43:06 2002
@@ -428,8 +428,8 @@
     ;
 
 emit:
-      EMIT   pasmcode                    { $$ = 0 }
-       EOM '\n'                                { emit_flush(); clear_tables();$$=0 }
+      EMIT   pasmcode                    { $$ = 0; }
+       EOM '\n'                                { emit_flush(); clear_tables();$$=0; }
     ;
 
 nls:
@@ -447,8 +447,8 @@
          emit_flush();
          clear_tables();
         }
-        | emit{ $$=0 }
-        | nls { $$=0 }
+        | emit{ $$=0; }
+        | nls { $$=0; }
     ;
 
 sub_start: SUB IDENTIFIER '\n'
@@ -586,26 +586,26 @@
     |  _var_or_i
     ;
 
-_var_or_i: var_or_i                     { regs[nargs++] = $1 }
+_var_or_i: var_or_i                     { regs[nargs++] = $1; }
     | lhs '[' keylist ']'               { regs[nargs++] = $1;
                                           regs[nargs++] = $3; $$= $1; }
     ;
 var_or_i:
        IDENTIFIER                      { $$ = mk_address($1, U_add_once); }
     |  var
-    | MACRO                             { $$ = macro($1+1); free($1)}
+    | MACRO                             { $$ = macro($1+1); free($1);}
     ;
 
 var:   VAR
     |  rc
     ;
 
-keylist:                                { nkeys=0 }
+keylist:                                { nkeys=0; }
        _keylist                         { $$ = link_keys(nkeys, keys); }
     ;
 
 _keylist: key                            { keys[nkeys++] = $1; }
-     | _keylist ';' key                  { keys[nkeys++] = $3; $$ =  keys[0] }
+     | _keylist ';' key                  { keys[nkeys++] = $3; $$ = keys[0]; }
     ;
 
 key:  var
diff -r -u parrot-orig/languages/imcc/instructions.c 
parrot-andy/languages/imcc/instructions.c
--- parrot-orig/languages/imcc/instructions.c   Mon Sep 23 14:05:21 2002
+++ parrot-andy/languages/imcc/instructions.c   Mon Sep 23 14:35:06 2002
@@ -49,7 +49,10 @@
 /* next 2 functions are called very often, says gprof
  * theys should be fast
  */
-inline int instruction_reads(Instruction* ins, SymReg* r) {
+#ifdef HAS_INLINE
+inline 
+#endif
+int instruction_reads(Instruction* ins, SymReg* r) {
     int f, i;
     SymReg *key;
 
@@ -66,7 +69,10 @@
     return 0;
 }
 
-inline int instruction_writes(Instruction* ins, SymReg* r) {
+#ifdef HAS_INLINE
+inline 
+#endif
+int instruction_writes(Instruction* ins, SymReg* r) {
     int f, i;
     SymReg *key;
 
-- 
    Andy Dougherty              [EMAIL PROTECTED]



Reply via email to