Description: Fixup to earlier preprocessing changes
 .
 cbmc (5.9-4) unstable; urgency=low
 .
   * Fix preprocessing flags for non-x86 architectures
   * Fix copy&paste error in built-in library
   * Fix endianness bugs in tests
   * Enable all hardening flags
Author: Michael Tautschnig <mt@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2018-07-04

--- cbmc-5.9.orig/regression/cbmc/Pointer_Arithmetic12/main.i
+++ cbmc-5.9/regression/cbmc/Pointer_Arithmetic12/main.i
@@ -96,27 +96,18 @@ int main()
   L_0x401_0: esp-=0x14;
   L_0x404_0: var15=ebp;
   L_0x404_1: var15-=0x4;
-#ifdef NONDET
-  L_0x404_2: *(uint32_t*)(var15)=nondet_uint();
-#else
   L_0x404_2: *(uint32_t*)(var15)=0xffffffff;
-#endif
   L_0x40b_0: var16=ebp;
   L_0x40b_1: var16-=0x4;
   L_0x40b_2: eax=*(uint32_t*)(var16);
   L_0x40e_0: *(uint32_t*)(esp)=eax;
   L_0x411_0: esp-=4; f__L_0x3c6_0(); esp+=4;
-#if 1
              uint32_t eax1=eax;
   C_0x3ff_0: ebp=esp;
   C_0x401_0: esp-=0x14;
   C_0x404_0: var15=ebp;
   C_0x404_1: var15-=0x4;
-#ifdef NONDET
-  C_0x404_2: *(uint32_t*)(var15)=nondet_uint();
-#else
   C_0x404_2: *(uint32_t*)(var15)=0xffffffff;
-#endif
   C_0x40b_0: var16=ebp;
   C_0x40b_1: var16-=0x4;
   C_0x40b_2: eax=*(uint32_t*)(var16);
@@ -124,7 +115,6 @@ int main()
   C_0x411_0: esp-=4; f__L_0x3c6_0(); esp+=4;
              uint32_t eax2=eax;
              __CPROVER_assert(eax2 == eax1, "");
-#endif
   L_0x416_0: esp=ebp;
   L_0x416_1: ebp=*(uint32_t*)(esp);
   L_0x416_2: esp+=0x4;
--- cbmc-5.9.orig/regression/cbmc/Pointer_byte_extract5/main.i
+++ cbmc-5.9/regression/cbmc/Pointer_byte_extract5/main.i
@@ -6,19 +6,14 @@ typedef union
   int b;
 } Union;
 
-#ifdef __GNUC__
-typedef struct
-{
-  int Count;
-  Union List[1];
-} __attribute__((packed)) Struct3;
-#else
+#pragma pack(push)
+#pragma pack(1)
 typedef struct
 {
   int Count;
   Union List[1];
 } Struct3;
-#endif
+#pragma pack(pop)
 
 int main()
 {
--- cbmc-5.9.orig/regression/cbmc/Struct_Padding1/main.i
+++ cbmc-5.9/regression/cbmc/Struct_Padding1/main.i
@@ -1,6 +1,3 @@
-#define STATIC_ASSERT(condition) \
-  int some_array##__LINE__[(condition) ? 1 : -1]
-
 struct my_struct1
 {
   int i;
@@ -38,8 +35,8 @@ struct my_struct3 {
    int i;
 } xx3= { 1, 2 };
 
-STATIC_ASSERT(sizeof(xx1)==4+1+3+4+4);
-STATIC_ASSERT(sizeof(xx2)==4+4+4+4);
+int some_array1[(sizeof(xx1)==4+1+3+4+4) ? 1 : -1];
+int some_array2[(sizeof(xx2)==4+4+4+4) ? 1 : -1];
 
 int main()
 {
--- cbmc-5.9.orig/regression/cbmc/Visual_Studio_Types1/main.i
+++ cbmc-5.9/regression/cbmc/Visual_Studio_Types1/main.i
@@ -1,7 +1,7 @@
 int main()
 {
   // these types are Visual Studio-specific
-  #ifdef _MSC_VER
+  /* #ifdef _MSC_VER */
   __int8 i1;
   __int16 i2;
   __int32 i3;
@@ -11,7 +11,7 @@ int main()
   assert(sizeof(i2)==2);
   assert(sizeof(i3)==4);
   assert(sizeof(i4)==8);
-  #endif
+  /* #endif */
 
   // general types
 
@@ -28,7 +28,7 @@ int main()
   assert(sizeof(ll)==8);
 
   // these constants are Visual Studio-specific
-  #ifdef _MSC_VER
+  /* #ifdef _MSC_VER */
   assert(sizeof(1i8)==1);
   assert(sizeof(1i16)==2);
   assert(sizeof(1i32)==4);
@@ -42,7 +42,7 @@ int main()
   // requires --i386-win32 to work
   assert(sizeof(p32)==4);
   //assert(sizeof(p64)==8);
-  #endif
+  /* #endif */
 
   assert(sizeof(void *)==4);
 }
--- cbmc-5.9.orig/regression/cbmc/Visual_Studio_Types2/main.i
+++ cbmc-5.9/regression/cbmc/Visual_Studio_Types2/main.i
@@ -12,14 +12,14 @@ int main()
   assert(sizeof(ll)==8);
 
   // oh, and these pointer qualifiers are MS-specific
-  #ifdef _MSC_VER
+  /* #ifdef _MSC_VER */
   int * __ptr32 p32;
   int * __ptr64 p64;
 
   // requires --winx64 to work
   assert(sizeof(p32)==4);
   assert(sizeof(p64)==8);
-  #endif
+  /* #endif */
 
   assert(sizeof(void *)==8);
 }
--- cbmc-5.9.orig/regression/cbmc/address_space_size_limit3/main.i
+++ cbmc-5.9/regression/cbmc/address_space_size_limit3/main.i
@@ -98,27 +98,18 @@ int main()
   L_0x401_0: esp-=0x14;
   L_0x404_0: var15=ebp;
   L_0x404_1: var15-=0x4;
-#ifdef NONDET
-  L_0x404_2: *(uint32_t*)(var15)=nondet_uint();
-#else
   L_0x404_2: *(uint32_t*)(var15)=0xffffffff;
-#endif
   L_0x40b_0: var16=ebp;
   L_0x40b_1: var16-=0x4;
   L_0x40b_2: eax=*(uint32_t*)(var16);
   L_0x40e_0: *(uint32_t*)(esp)=eax;
   L_0x411_0: esp-=4; f__L_0x3c6_0(); esp+=4;
-#if 1
              uint32_t eax1=eax;
   C_0x3ff_0: ebp=esp;
   C_0x401_0: esp-=0x14;
   C_0x404_0: var15=ebp;
   C_0x404_1: var15-=0x4;
-#ifdef NONDET
-  C_0x404_2: *(uint32_t*)(var15)=nondet_uint();
-#else
   C_0x404_2: *(uint32_t*)(var15)=0xffffffff;
-#endif
   C_0x40b_0: var16=ebp;
   C_0x40b_1: var16-=0x4;
   C_0x40b_2: eax=*(uint32_t*)(var16);
@@ -126,7 +117,6 @@ int main()
   C_0x411_0: esp-=4; f__L_0x3c6_0(); esp+=4;
              uint32_t eax2=eax;
              __CPROVER_assert(eax2 == eax1, "");
-#endif
   L_0x416_0: esp=ebp;
   L_0x416_1: ebp=*(uint32_t*)(esp);
   L_0x416_2: esp+=0x4;
