Add support for ANSI integer promotion rules
[fw/sdcc] / src / SDCCglobl.h
index 6cb18929baccb501402e1c8010b457401bffa52d..1c05ec56807083ecc6bf3fd129764da9dcc7a73f 100644 (file)
@@ -1,4 +1,4 @@
-/* SDCCglobl.h - global macros etc required by all files */
+;/* SDCCglobl.h - global macros etc required by all files */
 #ifndef SDCCGLOBL_H
 #define SDCCGLOBL_H
 #include <memory.h>
@@ -6,27 +6,28 @@
 #include <stdlib.h>
 #include <setjmp.h>
 #include <stdio.h>
-#include "sdccconf.h"
+
+#if defined(_MSC_VER)
+#      include "sdcc_vc.h"
+#else
+#      include "sdccconf.h"
+#endif // _MSC_VER
+
 #include "SDCCerr.h"
 
+#if defined(_MSC_VER)
+#      define NATIVE_WIN32             1
+#endif
+
 #ifdef __BORLANDC__
 #define NATIVE_WIN32           1
 #endif
+
 #ifdef __MINGW32__
 #define NATIVE_WIN32           1
 #endif
 
-#ifdef _NO_GC
-
-#define GC_malloc malloc
-#define GC_free free
-#define GC_realloc realloc
-#define GC_malloc_atomic malloc
-#else
-
-#include "./gc/gc.h" 
-
-#endif
+# include  "SDCCalloc.h"
 
 #define SPACE ' '
 #define ZERO  0
@@ -106,17 +107,6 @@ typedef int bool;
 #define EMPTY(x)       (x##StackPtr == 0 ? 1 : 0)
 #endif
 
-#define  ALLOC(x,sz) if (!(x = GC_malloc(sz)))      \
-         {                                          \
-            werror(E_OUT_OF_MEM,__FILE__,(long) sz);\
-            exit (1);                               \
-         }
-
-#define ALLOC_ATOMIC(x,sz)   if (!(x = GC_malloc_atomic(sz)))   \
-         {                                               \
-            werror(E_OUT_OF_MEM,__FILE__,(long) sz);     \
-            exit (1);                                    \
-         }
 
 #define COPYTYPE(start,end,from) (end = getSpec (start = from))
 
@@ -216,6 +206,7 @@ struct options {
     int nostdlib  : 1  ; /* Don't use standard lib files */
     int nostdinc  : 1  ; /* Don't use standard include files */
     int verbose   : 1  ; /* Show what the compiler is doing */
+    int ANSIint   : 1  ;  /* Use ANSI integer promotion rules in expressions. */
 
     char *calleeSaves[128]; /* list of functions using callee save */
     char *excludeRegs[32] ; /* registers excluded from saving */