Index: src/libcfa/concurrency/kernel
===================================================================
--- src/libcfa/concurrency/kernel	(revision 0fe4e6265f263a0fedaac815f2ed782fe74dabdd)
+++ src/libcfa/concurrency/kernel	(revision cdbfab0d9666b55e218af2f33951428230e8b826)
@@ -120,5 +120,5 @@
 #ifdef __CFA_DEBUG__
 	// Last function to enable preemption on this processor
-	char * last_enable;
+	const char * last_enable;
 #endif
 };
Index: src/libcfa/concurrency/monitor.c
===================================================================
--- src/libcfa/concurrency/monitor.c	(revision 0fe4e6265f263a0fedaac815f2ed782fe74dabdd)
+++ src/libcfa/concurrency/monitor.c	(revision cdbfab0d9666b55e218af2f33951428230e8b826)
@@ -823,5 +823,5 @@
 		this.monitor_count = thrd->monitors.size;
 
-		this.monitors = malloc( this.monitor_count * sizeof( *this.monitors ) );
+		this.monitors = (monitor_desc **)malloc( this.monitor_count * sizeof( *this.monitors ) );
 		for( int i = 0; i < this.monitor_count; i++ ) {
 			this.monitors[i] = thrd->monitors.list[i];
Index: src/libcfa/stdhdr/stddef.h
===================================================================
--- src/libcfa/stdhdr/stddef.h	(revision 0fe4e6265f263a0fedaac815f2ed782fe74dabdd)
+++ src/libcfa/stdhdr/stddef.h	(revision cdbfab0d9666b55e218af2f33951428230e8b826)
@@ -4,7 +4,7 @@
 // The contents of this file are covered under the licence agreement in the
 // file "LICENCE" distributed with Cforall.
-// 
-// stddef.h -- 
-// 
+//
+// stddef.h --
+//
 // Author           : Peter A. Buhr
 // Created On       : Mon Jul  4 23:25:26 2016
@@ -12,8 +12,10 @@
 // Last Modified On : Tue Jul  5 20:40:01 2016
 // Update Count     : 12
-// 
+//
 
 extern "C" {
-#include_next <stddef.h>								// has internal check for multiple expansion
+#include_next <stddef.h>                // has internal check for multiple expansion
+#undef NULL
+#define NULL 0                          // define NULL as 0 rather than (void*)0 to take advantage of zero_t
 } // extern "C"
 
Index: src/libcfa/stdlib
===================================================================
--- src/libcfa/stdlib	(revision 0fe4e6265f263a0fedaac815f2ed782fe74dabdd)
+++ src/libcfa/stdlib	(revision cdbfab0d9666b55e218af2f33951428230e8b826)
@@ -77,5 +77,5 @@
 	//printf( "X8\n" );
 	T * ptr = (T *)(void *)malloc( (size_t)sizeof(T) );	// C malloc
-    return memset( ptr, (int)fill, sizeof(T) );			// initial with fill value
+    return (T *)memset( ptr, (int)fill, sizeof(T) );			// initial with fill value
 } // alloc
 
@@ -87,10 +87,10 @@
 	//printf( "X10\n" );
 	T * ptr = (T *)(void *)malloc( dim * (size_t)sizeof(T) ); // C malloc
-    return memset( ptr, (int)fill, dim * sizeof(T) );
+    return (T *)memset( ptr, (int)fill, dim * sizeof(T) );
 } // alloc
 
 static inline forall( dtype T | sized(T) ) T * alloc( T ptr[], size_t dim ) {
 	//printf( "X11\n" );
-	return (void *)realloc( (void *)ptr, dim * (size_t)sizeof(T) ); // C realloc
+	return (T *)(void *)realloc( (void *)ptr, dim * (size_t)sizeof(T) ); // C realloc
 } // alloc
 forall( dtype T | sized(T) ) T * alloc( T ptr[], size_t dim, char fill );
@@ -103,5 +103,5 @@
 	//printf( "X14\n" );
     T * ptr = (T *)memalign( align, sizeof(T) );
-    return memset( ptr, (int)fill, sizeof(T) );
+    return (T *)memset( ptr, (int)fill, sizeof(T) );
 } // align_alloc
 
@@ -113,5 +113,5 @@
 	//printf( "X16\n" );
     T * ptr = (T *)memalign( align, dim * sizeof(T) );
-    return memset( ptr, (int)fill, dim * sizeof(T) );
+    return (T *)memset( ptr, (int)fill, dim * sizeof(T) );
 } // align_alloc
 
@@ -120,10 +120,10 @@
 static inline forall( dtype T | sized(T) ) T * memset( T * dest, char c ) {
 	//printf( "X17\n" );
-	return memset( dest, c, sizeof(T) );
+	return (T *)memset( dest, c, sizeof(T) );
 } // memset
 extern "C" { void * memcpy( void * dest, const void * src, size_t size ); } // use default C routine for void *
 static inline forall( dtype T | sized(T) ) T * memcpy( T * dest, const T * src ) {
 	//printf( "X18\n" );
-	return memcpy( dest, src, sizeof(T) );
+	return (T *)memcpy( dest, src, sizeof(T) );
 } // memcpy
 
@@ -131,9 +131,9 @@
 static inline forall( dtype T | sized(T) ) T * memset( T dest[], size_t dim, char c ) {
 	//printf( "X19\n" );
-	return (void *)memset( dest, c, dim * sizeof(T) );	// C memset
+	return (T *)(void *)memset( dest, c, dim * sizeof(T) );	// C memset
 } // memset
 static inline forall( dtype T | sized(T) ) T * memcpy( T dest[], const T src[], size_t dim ) {
 	//printf( "X20\n" );
-	return (void *)memcpy( dest, src, dim * sizeof(T) ); // C memcpy
+	return (T *)(void *)memcpy( dest, src, dim * sizeof(T) ); // C memcpy
 } // memcpy
 
Index: src/prelude/prelude.cf
===================================================================
--- src/prelude/prelude.cf	(revision 0fe4e6265f263a0fedaac815f2ed782fe74dabdd)
+++ src/prelude/prelude.cf	(revision cdbfab0d9666b55e218af2f33951428230e8b826)
@@ -403,24 +403,4 @@
 forall( dtype DT ) const volatile DT *  ?=?( const volatile  DT * volatile &, const volatile	DT * );
 
-forall( dtype DT ) DT *			?=?(		     DT *	   &,			void * );
-forall( dtype DT ) DT *			?=?(		     DT * volatile &,			void * );
-forall( dtype DT ) const DT *		?=?( const	     DT *	   &,			void * );
-forall( dtype DT ) const DT *		?=?( const	     DT * volatile &,			void * );
-forall( dtype DT ) const DT *		?=?( const	     DT *	   &, const		void * );
-forall( dtype DT ) const DT *		?=?( const	     DT * volatile &, const		void * );
-forall( dtype DT ) volatile DT *	?=?(	   volatile  DT *	   &,			void * );
-forall( dtype DT ) volatile DT *	?=?(	   volatile  DT * volatile &,			void * );
-forall( dtype DT ) volatile DT *	?=?(	   volatile  DT *	   &,	    volatile	void * );
-forall( dtype DT ) volatile DT *	?=?(	   volatile  DT * volatile &,	    volatile	void * );
-
-forall( dtype DT ) const volatile DT *	?=?( const volatile  DT *	   &,			void * );
-forall( dtype DT ) const volatile DT *	?=?( const volatile  DT * volatile &,			void * );
-forall( dtype DT ) const volatile DT *	?=?( const volatile  DT *	   &, const		void * );
-forall( dtype DT ) const volatile DT *	?=?( const volatile  DT * volatile &, const		void * );
-forall( dtype DT ) const volatile DT *	?=?( const volatile  DT *	   &,	    volatile	void * );
-forall( dtype DT ) const volatile DT *	?=?( const volatile  DT * volatile &,	    volatile	void * );
-forall( dtype DT ) const volatile DT *	?=?( const volatile  DT *	   &, const volatile	void * );
-forall( dtype DT ) const volatile DT *	?=?( const volatile  DT * volatile &, const volatile	void * );
-
 forall( dtype DT ) void *		 ?=?(		     void *	     &,			DT * );
 forall( dtype DT ) void *		 ?=?(		     void * volatile &,			DT * );
@@ -441,23 +421,4 @@
 forall( dtype DT ) const volatile void * ?=?( const volatile void *	     &, const volatile	DT * );
 forall( dtype DT ) const volatile void * ?=?( const volatile void * volatile &, const volatile	DT * );
-
-void *			?=?(		    void *	    &,		      void * );
-void *			?=?(		    void * volatile &,		      void * );
-const void *		?=?( const	    void *	    &,		      void * );
-const void *		?=?( const	    void * volatile &,		      void * );
-const void *		?=?( const	    void *	    &, const	      void * );
-const void *		?=?( const	    void * volatile &, const	      void * );
-volatile void *		?=?(	   volatile void *	    &,		      void * );
-volatile void *		?=?(	   volatile void * volatile &,		      void * );
-volatile void *		?=?(	   volatile void *	    &,	     volatile void * );
-volatile void *		?=?(	   volatile void * volatile &,	     volatile void * );
-const volatile void *	?=?( const volatile void *	    &,		      void * );
-const volatile void *	?=?( const volatile void * volatile &,		      void * );
-const volatile void *	?=?( const volatile void *	    &, const	      void * );
-const volatile void *	?=?( const volatile void * volatile &, const	      void * );
-const volatile void *	?=?( const volatile void *	    &,	     volatile void * );
-const volatile void *	?=?( const volatile void * volatile &,	     volatile void * );
-const volatile void *	?=?( const volatile void *	    &, const volatile void * );
-const volatile void *	?=?( const volatile void * volatile &, const volatile void * );
 
 //forall( dtype DT ) DT *			?=?(		    DT *	  &, zero_t );
@@ -781,15 +742,4 @@
 forall( dtype DT ) void ?{}( const volatile  DT *	   &, const volatile	DT * );
 
-forall( dtype DT ) void ?{}(		     DT *	   &,			void * );
-forall( dtype DT ) void ?{}( const	     DT *	   &,			void * );
-forall( dtype DT ) void ?{}( const	     DT *	   &, const		void * );
-forall( dtype DT ) void ?{}(	   volatile  DT *	   &,			void * );
-forall( dtype DT ) void ?{}(	   volatile  DT *	   &,	    volatile	void * );
-
-forall( dtype DT ) void ?{}( const volatile  DT *	   &,			void * );
-forall( dtype DT ) void ?{}( const volatile  DT *	   &, const		void * );
-forall( dtype DT ) void ?{}( const volatile  DT *	   &,	    volatile	void * );
-forall( dtype DT ) void ?{}( const volatile  DT *	   &, const volatile	void * );
-
 forall( dtype DT ) void ?{}(		     void *	     &,			DT * );
 forall( dtype DT ) void ?{}( const	     void *	     &,			DT * );
@@ -802,14 +752,4 @@
 forall( dtype DT ) void ?{}( const volatile void *	     &, const volatile	DT * );
 
-void 	?{}(		    void *	    &,		      void * );
-void 	?{}( const	    void *	    &,		      void * );
-void 	?{}( const	    void *	    &, const	      void * );
-void 	?{}(	   volatile void *	    &,		      void * );
-void 	?{}(	   volatile void *	    &,	     volatile void * );
-void 	?{}( const volatile void *	    &,		      void * );
-void 	?{}( const volatile void *	    &, const	      void * );
-void 	?{}( const volatile void *	    &,	     volatile void * );
-void 	?{}( const volatile void *	    &, const volatile void * );
-
 //forall( dtype DT ) void ?{}(		    DT *	  &, zero_t );
 //forall( dtype DT ) void ?{}(		    DT * volatile &, zero_t );
Index: src/tests/.expect/alloc-ERROR.txt
===================================================================
--- src/tests/.expect/alloc-ERROR.txt	(revision cdbfab0d9666b55e218af2f33951428230e8b826)
+++ src/tests/.expect/alloc-ERROR.txt	(revision cdbfab0d9666b55e218af2f33951428230e8b826)
@@ -0,0 +1,44 @@
+alloc.c:259:1 error: No reasonable alternatives for expression Applying untyped: 
+  Name: ?=?
+...to: 
+  Name: p
+  Applying untyped: 
+    Name: alloc
+  ...to: 
+    Name: stp
+    Applying untyped: 
+      Name: ?*?
+    ...to: 
+      Name: dim
+      Sizeof Expression on: Applying untyped: 
+          Name: *?
+        ...to: 
+          Name: stp
+
+
+
+
+alloc.c:260:1 error: No reasonable alternatives for expression Applying untyped: 
+  Name: ?=?
+...to: 
+  Name: p
+  Applying untyped: 
+    Name: memset
+  ...to: 
+    Name: stp
+    constant expression (10 10: signed int)
+
+
+alloc.c:261:1 error: No reasonable alternatives for expression Applying untyped: 
+  Name: ?=?
+...to: 
+  Name: p
+  Applying untyped: 
+    Name: memcpy
+  ...to: 
+    Address of:
+      Name: st1
+    Address of:
+      Name: st
+
+
Index: src/tests/Makefile.am
===================================================================
--- src/tests/Makefile.am	(revision 0fe4e6265f263a0fedaac815f2ed782fe74dabdd)
+++ src/tests/Makefile.am	(revision cdbfab0d9666b55e218af2f33951428230e8b826)
@@ -141,2 +141,5 @@
 typedefRedef-ERR1: typedefRedef.c @CFA_BINDIR@/@CFA_NAME@
 	${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
+
+alloc-ERROR: alloc.c @CFA_BINDIR@/@CFA_NAME@
+	${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
Index: src/tests/Makefile.in
===================================================================
--- src/tests/Makefile.in	(revision 0fe4e6265f263a0fedaac815f2ed782fe74dabdd)
+++ src/tests/Makefile.in	(revision cdbfab0d9666b55e218af2f33951428230e8b826)
@@ -895,4 +895,7 @@
 	${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
 
+alloc-ERROR: alloc.c @CFA_BINDIR@/@CFA_NAME@
+	${CC} ${AM_CFLAGS} ${CFLAGS} -DERR1 ${<} -o ${@}
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
Index: src/tests/alloc.c
===================================================================
--- src/tests/alloc.c	(revision 0fe4e6265f263a0fedaac815f2ed782fe74dabdd)
+++ src/tests/alloc.c	(revision cdbfab0d9666b55e218af2f33951428230e8b826)
@@ -32,5 +32,5 @@
 	// allocation, non-array types
 
-	p = (void *)malloc( sizeof(*p) );                   // C malloc, type unsafe
+	p = (int *)(void *)malloc( sizeof(*p) );                   // C malloc, type unsafe
 	*p = 0xdeadbeef;
 	printf( "C   malloc %#x\n", *p );
@@ -54,5 +54,5 @@
 	printf( "\n" );
 
-	p = calloc( dim, sizeof( *p ) );                    // C array calloc, type unsafe
+	p = (int *)calloc( dim, sizeof( *p ) );                    // C array calloc, type unsafe
 	printf( "C   array calloc, fill 0\n" );
 	for ( int i = 0; i < dim; i += 1 ) { printf( "%#x ", p[i] ); }
@@ -83,5 +83,5 @@
 	printf( "\n" );
 
-	p = (void *)realloc( p, dim * sizeof(*p) );         // C realloc
+	p = (int *)(void *)realloc( p, dim * sizeof(*p) );         // C realloc
 	for ( int i = 0; i < dim; i += 1 ) { p[i] = 0xdeadbeef; }
 	printf( "C   realloc\n" );
@@ -256,7 +256,9 @@
 	stp = malloc();
 	printf( "\nSHOULD FAIL\n" );
+#ifdef ERR1
 	p = alloc( stp, dim * sizeof(*stp) );
 	p = memset( stp, 10 );
 	p = memcpy( &st1, &st );
+#endif
 } // main
 
Index: src/tests/dtor-early-exit.c
===================================================================
--- src/tests/dtor-early-exit.c	(revision 0fe4e6265f263a0fedaac815f2ed782fe74dabdd)
+++ src/tests/dtor-early-exit.c	(revision cdbfab0d9666b55e218af2f33951428230e8b826)
@@ -22,5 +22,5 @@
 
 struct A {
-	char * name;
+	const char * name;
 	int * x;
 };
Index: src/tests/init_once.c
===================================================================
--- src/tests/init_once.c	(revision 0fe4e6265f263a0fedaac815f2ed782fe74dabdd)
+++ src/tests/init_once.c	(revision cdbfab0d9666b55e218af2f33951428230e8b826)
@@ -72,5 +72,5 @@
 	insert( &constructed, &x );
 
-	x.x = malloc(sizeof(int));
+	x.x = (int *)malloc(sizeof(int));
 }
 
Index: src/tests/multiDimension.c
===================================================================
--- src/tests/multiDimension.c	(revision 0fe4e6265f263a0fedaac815f2ed782fe74dabdd)
+++ src/tests/multiDimension.c	(revision cdbfab0d9666b55e218af2f33951428230e8b826)
@@ -7,5 +7,5 @@
   printf("default constructing\n");
   (this.a){ 123 };
-  this.ptr = malloc(sizeof(int));
+  this.ptr = (int *)malloc(sizeof(int));
 }
 
@@ -13,5 +13,5 @@
   printf("copy constructing\n");
   (this.a){ other.a };
-  this.ptr = malloc(sizeof(int));
+  this.ptr = (int *)malloc(sizeof(int));
 }
 
@@ -19,5 +19,5 @@
   printf("constructing with %d\n", a);
   (this.a){ a };
-  this.ptr = malloc(sizeof(int));
+  this.ptr = (int *)malloc(sizeof(int));
 }
 
Index: src/tests/tupleVariadic.c
===================================================================
--- src/tests/tupleVariadic.c	(revision 0fe4e6265f263a0fedaac815f2ed782fe74dabdd)
+++ src/tests/tupleVariadic.c	(revision cdbfab0d9666b55e218af2f33951428230e8b826)
@@ -73,5 +73,5 @@
 	[a0, a1, a2, a3] = args;
 	a.size = 4;
-	a.data = malloc(sizeof(int)*a.size);
+	a.data = (int *)malloc(sizeof(int)*a.size);
 	a.data[0] = a0;
 	a.data[1] = a1;
Index: src/tests/vector/vector_int.c
===================================================================
--- src/tests/vector/vector_int.c	(revision 0fe4e6265f263a0fedaac815f2ed782fe74dabdd)
+++ src/tests/vector/vector_int.c	(revision cdbfab0d9666b55e218af2f33951428230e8b826)
@@ -27,5 +27,5 @@
 	vec.last = -1;
 	vec.capacity = reserve;
-	vec.data = malloc( sizeof( int ) * reserve );
+	vec.data = (int *)malloc( sizeof( int ) * reserve );
 }
 
@@ -33,5 +33,5 @@
 	vec.last = other.last;
 	vec.capacity = other.capacity;
-	vec.data = malloc( sizeof( int ) * other.capacity );
+	vec.data = (int *)malloc( sizeof( int ) * other.capacity );
 	for (int i = 0; i < vec.last; i++) {
 		vec.data[i] = other.data[i];
@@ -45,5 +45,5 @@
 void reserve( vector_int *vec, int reserve ) {
 	if ( reserve > vec->capacity ) {
-		vec->data = realloc( vec->data, sizeof( int ) * reserve );
+		vec->data = (int *)realloc( vec->data, sizeof( int ) * reserve );
 		vec->capacity = reserve;
 	}
@@ -54,5 +54,5 @@
 	if ( vec->last == vec->capacity ) {
 		vec->capacity *= 2;
-		vec->data = realloc( vec->data, sizeof( int ) * vec->capacity );
+		vec->data = (int *)realloc( vec->data, sizeof( int ) * vec->capacity );
 	}
 	vec->data[ vec->last ] = element;
