* fixed GCC 4.4.0 mingw compilation:
[fw/sdcc] / src / regression / struct1.c
index 32baf80876fd9fbc7986b5604c6373e8eade31e8..99b9f21c3aa817611f673d712d8e62a05dc31b84 100644 (file)
@@ -1,17 +1,15 @@
-//#include "p16c84.h"
+#include "gpsim_assert.h"
 // Addition tests
 
 /* bit types are not ANSI - so provide a way of disabling bit types
  * if this file is used to test other compilers besides SDCC */
-#define SUPPORT_BIT_TYPES 1
+#define SUPPORT_BIT_TYPES 0
 
 /* Some compilers that support bit types do not support bit arithmetic 
  * (like bitx = bity + bitz;) */
 #define SUPPORT_BIT_ARITHMETIC 1
 
-unsigned char success = 0;
 unsigned char failures = 0;
-unsigned char dummy = 0;
 
 #if SUPPORT_BIT_TYPES
 
@@ -46,11 +44,10 @@ struct chars
 struct chars struct1;
 
 void
-done ()
+done()
 {
-
-  dummy++;
-
+  ASSERT(MANGLE(failures) == 0);
+  PASSED();
 }
 
 void
@@ -103,6 +100,5 @@ main (void)
   struct1.c1 = 1;
   add_chars();
 
-  success = failures;
   done ();
 }