pike.git / src / las.c

version» Context lines:

pike.git/src/las.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #include "global.h" - RCSID("$Id: las.c,v 1.155 1999/12/30 21:36:02 mast Exp $"); + RCSID("$Id: las.c,v 1.156 1999/12/30 21:57:28 grubba Exp $");      #include "language.h"   #include "interpret.h"   #include "las.h"   #include "array.h"   #include "object.h"   #include "stralloc.h"   #include "dynamic_buffer.h"   #include "lex.h"   #include "pike_types.h"
pike.git/src/las.c:948:    node *res;       if(!n) return 0;      #ifdef PIKE_DEBUG    if (!type) {    fatal("Soft cast to no type!\n");    }   #endif /* PIKE_DEBUG */    +  if (compiler_pass == 2) {    if (type == void_type_string) {    yywarning("Soft cast to void.");    return mknode(F_POP_VALUE, n, 0);    }       if(type==n->type) {    struct pike_string *t1 = describe_type(type);    yywarning("Soft cast to %s is a noop.", t1->str);    free_string(t1);    return n;
pike.git/src/las.c:974:    yywarning("Soft cast to %s isn't a restriction of %s.",    t1->str, t2->str);    free_string(t2);    free_string(t1);    }    /* FIXME: check_soft_cast() is weaker than pike_types_le()    * The resulting type should probably be the and between the old    * and the new type.    */    } +  } +     res = mkemptynode();    res->token = F_SOFT_CAST;    copy_shared_string(res->type,type);       res->tree_info |= n->tree_info;       _CAR(res) = n;   #ifdef SHARED_NODES    _CDR(res) = (node *)type;   #else /* !SHARED_NODES */