Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.146
 
1.147
 
MAIN:ragge:20110602144056
 
local.c
_>411411                         if (kflag == 0) {
 412412                                 if (q->slevel == 0)
 413413                                         break;
<>414 -                        } else if (blevel > 0 && !doing_init)
  414+                        } else if (blevel > 0 && !statinit)
415415                                 p = picstatic(p);
 416416                         break;
 417417 
     
 !
436436 #endif
 437437                         if (kflag == 0)
 438438                                 break;
<>439 -                        if (blevel > 0 && !doing_init)
  439+                        if (blevel > 0 && !statinit)
440440                                 p = picext(p);
 441441                         break;
 442442                 }
     
 !
587587                 m = p->n_type;
 588588 
 589589                 if (o == ICON) {
<>590 -                        CONSZ val = l->n_lval;
 591 -
 592 -                        if (!ISPTR(m)) /* Pointers don't need to be conv'd */
 593 -                            switch (m) {
 594 -                        case BOOL:
 595 -                                l->n_lval = nncon(l) ? (l->n_lval != 0) : 1;
 596 -                                l->n_sp = NULL;
  590+                        /*
  591+                         * Can only end up here if o is an address,
  592+                         * and in that case the only compile-time conversion
  593+                         * possible is to int.
  594+                         */
  595+                        if ((TMASK & l->n_type) == 0)
  596+                                cerror("SCONV ICON");
  597+                        if (l->n_sp == 0) {
  598+                                p->n_type = UNSIGNED;
  599+                                concast(l, m);
  600+                        } else if (m != INT && m != UNSIGNED)
597601                                 break;
<>598 -                        case CHAR:
 599 -                                l->n_lval = (char)val;
 600 -                                break;
 601 -                        case UCHAR:
 602 -                                l->n_lval = val & 0377;
 603 -                                break;
 604 -                        case SHORT:
 605 -                                l->n_lval = (short)val;
 606 -                                break;
 607 -                        case USHORT:
 608 -                                l->n_lval = val & 0177777;
 609 -                                break;
 610 -                        case ULONG:
 611 -                        case UNSIGNED:
 612 -                                l->n_lval = val & 0xffffffff;
 613 -                                break;
 614 -                        case LONG:
 615 -                        case INT:
 616 -                                l->n_lval = (int)val;
 617 -                                break;
 618 -                        case LONGLONG:
 619 -                                l->n_lval = (long long)val;
 620 -                                break;
 621 -                        case ULONGLONG:
 622 -                                l->n_lval = val;
 623 -                                break;
 624 -                        case VOID:
 625 -                                break;
 626 -                        case LDOUBLE:
 627 -                        case DOUBLE:
 628 -                        case FLOAT:
 629 -                                l->n_op = FCON;
 630 -                                l->n_dcon = val;
 631 -                                break;
 632 -                        default:
 633 -                                cerror("unknown type %d", m);
 634 -                        }
635602                         l->n_type = m;
 636603                         l->n_ap = 0;
 637604                         nfree(p);
 638605                         return l;
<>639 -                } else if (l->n_op == FCON) {
 640 -                        l->n_lval = (CONSZ)l->n_dcon;
 641 -                        l->n_sp = NULL;
 642 -                        l->n_op = ICON;
 643 -                        l->n_type = m;
 644 -                        l->n_ap = 0;
 645 -                        nfree(p);
 646 -                        return clocal(l);
 647 -                }
  606+                } else if (l->n_op == FCON)
  607+                        cerror("SCONV FCON");
648608                 if ((p->n_type == CHAR || p->n_type == UCHAR ||
 649609                     p->n_type == SHORT || p->n_type == USHORT) &&
 650610                     (l->n_type == FLOAT || l->n_type == DOUBLE ||
     
 !
662622                 if (o == MOD && p->n_type != CHAR && p->n_type != SHORT)
 663623                         break;
 664624                 /* make it an int division by inserting conversions */
<>665 -                p->n_left = block(SCONV, p->n_left, NIL, INT, 0, 0);
 666 -                p->n_right = block(SCONV, p->n_right, NIL, INT, 0, 0);
 667 -                p = block(SCONV, p, NIL, p->n_type, 0, 0);
 668 -                p->n_left->n_type = INT;
  625+                p->n_left = makety(p->n_left, INT, 0, 0, 0);
  626+                p->n_right = makety(p->n_right, INT, 0, 0, 0);
  627+                o = p->n_type;
  628+                p->n_type = INT;
  629+                p = makety(p, o, 0, 0, 0);
<_669630                 break;
 670631 
 671632         case PMCONV:
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-09-24 06:30 +0200