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.96 1999/11/05 23:22:04 grubba Exp $"); + RCSID("$Id: las.c,v 1.97 1999/11/06 00:08:45 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:1945:    break;       case F_COMMA_EXPR:    if(!CAR(n)) goto use_cdr;    if(!CDR(n)) goto use_car;       /* const , X -> X */    if (CAR(n)->token == F_CONSTANT) {    goto use_cdr;    } +  /* ((void) const) , X -> X */ +  if (CAR(n)->token == F_CAST && +  CAR(n)->type == void_type_string && +  CAAR(n)->token == F_CONSTANT) { +  goto use_cdr; +  }    /* (X , const) , Y -> X , Y */    if (CAR(n)->token == F_COMMA_EXPR &&    CDAR(n)->token == F_CONSTANT) {    tmp1 = mknode(F_COMMA_EXPR, CAAR(n), CDR(n));    CAAR(n) = CDR(n) = 0;    goto use_tmp1;    } -  +  /* ((void)(X, const)), Y -> ((void) X), Y */ +  if (CAR(n)->token == F_CAST && +  CAR(n)->type == void_type_string && +  CAAR(n)->token == F_COMMA_EXPR && +  CDR(CAAR(n))->token == F_CONSTANT) { +  tmp1 = mknode(F_COMMA_EXPR, mkcastnode(void_type_string, CAR(CAAR(n))), +  CDR(n)); +  CAR(CAAR(n)) = CDR(n) = 0; +  goto use_tmp1; +  }    /* FALL_THROUGH */    case F_ARG_LIST:    case F_LVALUE_LIST:    if(!CAR(n)) goto use_cdr;    if(!CDR(n)) goto use_car;       /*    * { X; break; Y; } -> { X; return; }    * { X; return; Y; } -> { X; return; }    * { X; continue; Y; } -> { X; return; }