Changes to allow compiler with gcc-2.8.1 in C++ mode,
[p5sagit/p5-mst-13.2.git] / toke.c
diff --git a/toke.c b/toke.c
index 128b828..d448e75 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -318,16 +318,14 @@ restore_rsfp(void *f)
 }
 
 static void
-restore_expect(e)
-void *e;
+restore_expect(void *e)
 {
     /* a safe way to store a small integer in a pointer */
     expect = (expectation)((char *)e - tokenbuf);
 }
 
 static void
-restore_lex_expect(e)
-void *e;
+restore_lex_expect(void *e)
 {
     /* a safe way to store a small integer in a pointer */
     lex_expect = (expectation)((char *)e - tokenbuf);
@@ -555,7 +553,7 @@ force_ident(register char *s, int kind)
            /* XXX see note in pp_entereval() for why we forgo typo
               warnings if the symbol must be introduced in an eval.
               GSAR 96-10-12 */
-           gv_fetchpv(s, in_eval ? GV_ADDMULTI : TRUE,
+           gv_fetchpv(s, in_eval ? (GV_ADDMULTI | 8) : TRUE,
                kind == '$' ? SVt_PV :
                kind == '@' ? SVt_PVAV :
                kind == '%' ? SVt_PVHV :
@@ -1509,7 +1507,7 @@ yylex(void)
        /* build ops for a bareword */
        yylval.opval = (OP*)newSVOP(OP_CONST, 0, newSVpv(tokenbuf+1, 0));
        yylval.opval->op_private = OPpCONST_ENTERED;
-       gv_fetchpv(tokenbuf+1, in_eval ? GV_ADDMULTI : TRUE,
+       gv_fetchpv(tokenbuf+1, in_eval ? (GV_ADDMULTI | 8) : TRUE,
                   ((tokenbuf[0] == '$') ? SVt_PV
                    : (tokenbuf[0] == '@') ? SVt_PVAV
                    : SVt_PVHV));
@@ -2848,7 +2846,8 @@ yylex(void)
                    s = scan_word(s, tokenbuf + len, sizeof tokenbuf - len,
                                  TRUE, &morelen);
                    if (!morelen)
-                       croak("Bad name after %s::", tokenbuf);
+                       croak("Bad name after %s%s", tokenbuf,
+                               *s == '\'' ? "'" : "::");
                    len += morelen;
                }
 
@@ -4969,7 +4968,7 @@ scan_trans(char *start)
        if (lex_stuff)
            SvREFCNT_dec(lex_stuff);
        lex_stuff = Nullsv;
-       croak("Translation pattern not terminated");
+       croak("Transliteration pattern not terminated");
     }
     if (s[-1] == multi_open)
        s--;
@@ -4982,7 +4981,7 @@ scan_trans(char *start)
        if (lex_repl)
            SvREFCNT_dec(lex_repl);
        lex_repl = Nullsv;
-       croak("Translation replacement not terminated");
+       croak("Transliteration replacement not terminated");
     }
 
     New(803,tbl,256,short);