Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.56
 
1.57
 
MAIN:ragge:20071005153917
 
local.c
_>2929 
 3030 #include "pass1.h"
 3131 
<> 32+/*
  33+ * Check if a constant is too large for a type.
  34+ */
  35+static int
  36+toolarge(TWORD t, CONSZ con)
  37+{
  38+        U_CONSZ ucon = con;
  39+
  40+        switch (t) {
  41+        case ULONGLONG:
  42+        case LONGLONG:
  43+                break; /* cannot be too large */
  44+#define SCHK(i) case i: if (con > MAX_##i || con < MIN_##i) return 1; break
  45+#define UCHK(i) case i: if (ucon > MAX_##i) return 1; break
  46+        SCHK(INT);
  47+        SCHK(SHORT);
  48+        SCHK(CHAR);
  49+        UCHK(UNSIGNED);
  50+        UCHK(USHORT);
  51+        UCHK(UCHAR);
  52+        default:
  53+                cerror("toolarge");
  54+        }
  55+        return 0;
  56+}
  57+
3258 /*      this file contains code which is dependent on the target machine */
 3359 
 3460 /* clocal() is called to do local transformations on
     
 !
121147                                 r = l->n_left->n_left;
 122148                                 if (r->n_type >= FLOAT && r->n_type <= LDOUBLE)
 123149                                         break;
<> 150+                                if (toolarge(r->n_type, l->n_right->n_lval))
  151+                                        break;
<_124152                                 /* Type must be correct */
 125153                                 t = r->n_type;
 126154                                 nfree(l->n_left);
FishEye: Open Source License registered to PCC.
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-12-26 00:27 +0100