]> andersk Git - splint.git/blobdiff - src/cppexp.c
noexpand always false.
[splint.git] / src / cppexp.c
index 8182205af963c9a4898e8c5daa4c6c8456d15e29..2cdc8a50a8bb6657b4363b65d797c939d11b8bcc 100644 (file)
@@ -57,7 +57,7 @@ Written by Per Bothner 1994.  */
 
 # include <string.h> 
 # include "splintMacros.nf"
-# include "llbasic.h"
+# include "basic.h"
 # include "cpplib.h"
 # include "cpphash.h"
 # include "cppexp.h"
@@ -366,7 +366,6 @@ cppReader_parseNumber (cppReader *pfile, char *start, int olen) /*@requires maxR
   
   if (overflow)
     {
-      /*@i23 add flags for all these...*/
       cppReader_pedwarnLit
        (pfile, 
         cstring_makeLiteralTemp ("Integer constant out of range"));
@@ -810,13 +809,14 @@ left_shift (cppReader *pfile, long a, bool unsignedp, unsigned long b)
     }
   else
     {
-      long l = int_toNonNegative (a) << b;
+      /*@-shiftimplementation@*/
+      long l = a << b; /* int_toNonNegative removed (allow shifts of negative values) */ 
 
 # ifdef WIN32
 # pragma warning( disable : 4018 )
 # endif
 
-      if (int_toNonNegative (l) >> b != a)
+      if (l >> b != a) /* int_toNonNegative removed (allow shifts of negative values) */ 
        {
          integer_overflow (pfile);
        }
@@ -833,7 +833,8 @@ right_shift (long a, bool unsignedp, unsigned long b)
   else if (unsignedp)
     return (unsigned long) a >> b;
   else
-    return int_toNonNegative (a) >> b;
+    return a >> b; /* int_toNonNegative removed (allow shifts of negative values) */ 
+  /*@=shiftimplementation@*/
 }
 
 /* These priorities are all even, so we can handle associatively.  */
This page took 0.218843 seconds and 4 git commands to generate.