Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.110
 
1.111
 
MAIN:ragge:20040612085728
 
trees.c
_>696696         if (BTYPE(t2) == VOID && (t1 & TMASK))
 697697                 return;
 698698 
<> 699+#ifdef notdef
  700+        /* C99 says that enums always should be handled as ints */
699701         /* check for enumerations */
 700702         if (t1==ENUMTY || t2==ENUMTY) {
 701703                 if( clogop( p->n_op ) && p->n_op != EQ && p->n_op != NE ) {
<>702 -#ifdef notdef
 703 -                /* C99 says that enums always should be handled as ints */
704704                         werror( "comparison of enums" );
<>705 -#endif
706705                         return;
 707706                         }
 708707                 if (t1==ENUMTY && t2==ENUMTY) {
<>709 -#ifdef notdef
 710 -                /* C99 says that enums always should be handled as ints */
711708                         if (p->n_left->n_sue!=p->n_right->n_sue)
 712709                                 werror("enumeration type clash, "
 713710                                     "operator %s", copst(p->n_op));
<>714 -#endif
715711                         return;
 716712                 }
 717713                 if ((t1 == ENUMTY && t2 <= BTMASK) ||
 718714                     (t2 == ENUMTY && t1 <= BTMASK))
 719715                         return;
 720716         }
<> 717+#endif
721718 
 722719         if (ISPTR(t1) || ISARY(t1))
 723720                 q = p->n_right;
     
 !
951948 
 952949         if( (ty=BTYPE(p->n_type)) == ENUMTY || ty == MOETY ) {
 953950                 if (p->n_sue->suesize == SZCHAR)
<>954 -                        ty = CHAR;
  951+                        ty = INT;
955952                 else if (p->n_sue->suesize == SZINT)
 956953                         ty = INT;
 957954                 else if (p->n_sue->suesize == SZSHORT)
<>958 -                        ty = SHORT;
  955+                        ty = INT;
959956                 else if (p->n_sue->suesize == SZLONGLONG)
 960957                         ty = LONGLONG;
 961958                 else
     
 !
11291126                 t2 = DEUNSIGN(t2);
 11301127                 }
 11311128 
<> 1129+        if (t1 == ENUMTY || t1 == MOETY)
  1130+                t1 = INT; /* XXX */
  1131+        if (t2 == ENUMTY || t2 == MOETY)
  1132+                t2 = INT; /* XXX */
11321133 #if 0
 11331134         if ((t1 == CHAR || t1 == SHORT) && o!= RETURN)
 11341135                 t1 = INT;
     
 !
13831384         case LE:
 13841385         case GT:
 13851386         case GE:
<>1386 -                if( (mt1&MENU)||(mt2&MENU) ) return( PTMATCH+PUN+NCVT );
13871387                 if( mt12 & MDBI ) return( TYMATCH+CVTO );
 13881388                 else if( mt12 & MPTR ) return( PTMATCH+PUN );
 13891389                 else if( mt12 & MPTI ) return( PTMATCH+PUN );
     
 !
14011401                 return( TYPL );
 14021402 
 14031403         case COLON:
<>1404 -                if( mt12 & MENU ) return( NCVT+PUN+PTMATCH );
 1405 -                else if( mt12 & MDBI ) return( TYMATCH );
  1404+                if( mt12 & MDBI ) return( TYMATCH );
14061405                 else if( mt12 & MPTR ) return( TYPL+PTMATCH+PUN );
 14071406                 else if( (mt1&MINT) && (mt2&MPTR) ) return( TYPR+PUN );
 14081407                 else if( (mt1&MPTR) && (mt2&MINT) ) return( TYPL+PUN );
 14091408                 else if( mt12 & MSTR ) return( NCVT+TYPL+OTHER );
<>1410 -                else if ((mt1&MINT) && (mt2&MENU)) return(NCVT+TYPL+TYMATCH);
 1411 -                else if ((mt2&MINT) && (mt1&MENU)) return(NCVT+TYPR+TYMATCH);
14121409                 break;
 14131410 
 14141411         case ASSIGN:
 14151412         case RETURN:
 14161413                 if( mt12 & MSTR ) return( LVAL+NCVT+TYPL+OTHER );
 14171414         case CAST:
 14181415                 if( mt12 & MDBI ) return( TYPL+LVAL+TYMATCH );
<> 1416+#if 0
14191417                 else if(mt1&MENU && mt2&MDBI) return( TYPL+LVAL+TYMATCH );
 14201418                 else if(mt2&MENU && mt1&MDBI) return( TYPL+LVAL+TYMATCH );
 14211419                 else if( (mt1&MENU)||(mt2&MENU) )
 14221420                         return( LVAL+NCVT+TYPL+PTMATCH+PUN );
<> 1421+#endif
14231422                 else if( mt1 & MPTR) return( LVAL+PTMATCH+PUN );
 14241423                 else if( mt12 & MPTI ) return( TYPL+LVAL+TYMATCH+PUN );
 14251424                 break;
     
 !
14611460         case PLUS:
 14621461                 if (mt12 & MDBI)
 14631462                         return(TYMATCH);
<>1464 -                else if ((mt1&MPTR) && (mt2&MINT || mt2&MENU))
  1463+                else if ((mt1&MPTR) && (mt2&MINT))
14651464                         return(TYPL+CVTR);
<>1466 -                else if ((mt1&MINT || mt1&MENU) && (mt2&MPTR))
  1465+                else if ((mt1&MINT) && (mt2&MPTR))
14671466                         return(TYPR+CVTL);
 14681467 
 14691468         }
     
 !
14781477 
 14791478         case ENUMTY:
 14801479         case MOETY:
<>1481 -                return( MENU|MINT|MDBI );
  1480+                return( MENU|MINT|MDBI|MPTI );
<_14821481 
 14831482         case STRTY:
 14841483         case UNIONTY:
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-01 20:31 +0200