Index: src/Common/SemanticError.h
===================================================================
--- src/Common/SemanticError.h	(revision 6b8b7673f28eb55cef2a4e2507115188d1cf4829)
+++ src/Common/SemanticError.h	(revision 0a7314835850e701278bbf94ddc69891ef88543d)
@@ -56,4 +56,5 @@
 	{"reference-conversion"   , "rvalue to reference conversion of rvalue: %s" , Severity::Warn},
 	{"qualifiers-zero_t-one_t", "questionable use of type qualifier %s with %s", Severity::Warn},
+	{"aggregate-forward-decl" , "forward declaration of nested aggregate: %s"  , Severity::Warn},
 };
 
@@ -62,4 +63,5 @@
 	RvalueToReferenceConversion,
 	BadQualifiersZeroOne,
+	AggrForwardDecl,
 	NUMBER_OF_WARNINGS, //This MUST be the last warning
 };
Index: src/Parser/DeclarationNode.cc
===================================================================
--- src/Parser/DeclarationNode.cc	(revision 6b8b7673f28eb55cef2a4e2507115188d1cf4829)
+++ src/Parser/DeclarationNode.cc	(revision 0a7314835850e701278bbf94ddc69891ef88543d)
@@ -1003,4 +1003,29 @@
 				// };
 				if ( ! (extracted && decl->name == "" && ! anon) ) {
+					if (decl->name == "") {
+						if ( DeclarationWithType * dwt = dynamic_cast<DeclarationWithType *>( decl ) ) {
+							if ( ReferenceToType * aggr = dynamic_cast<ReferenceToType *>( dwt->get_type() ) ) {
+								if ( aggr->name.find("anonymous") == std::string::npos ) {
+									bool isInline = false;
+									if (cur->type->kind == TypeData::Aggregate || cur->type->kind == TypeData::AggregateInst) {
+										if (cur->type->kind == TypeData::Aggregate) {
+											isInline = cur->type->aggregate.inLine;
+										} else {
+											isInline = cur->type->aggInst.inLine;
+											if ( TypeData * aggr = cur->type->aggInst.aggregate ) {
+												if ( aggr->kind == TypeData::Aggregate ) {
+													isInline = isInline || aggr->aggregate.inLine;
+												}
+											}
+										}
+									}
+									if (! isInline) {
+										// temporary: warn about anonymous member declarations of named types, since this conflicts with the syntax for the forward declaration of an anonymous type
+										SemanticWarning( cur->location, Warning::AggrForwardDecl, aggr->name.c_str() );
+									}
+								}
+							}
+						}
+					}
 					decl->location = cur->location;
 					* out++ = decl;
Index: src/Parser/TypedefTable.cc
===================================================================
--- src/Parser/TypedefTable.cc	(revision 6b8b7673f28eb55cef2a4e2507115188d1cf4829)
+++ src/Parser/TypedefTable.cc	(revision 0a7314835850e701278bbf94ddc69891ef88543d)
@@ -5,11 +5,11 @@
 // file "LICENCE" distributed with Cforall.
 //
-// TypedefTable.cc -- 
+// TypedefTable.cc --
 //
 // Author           : Peter A. Buhr
 // Created On       : Sat May 16 15:20:13 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Jul 12 16:16:24 2018
-// Update Count     : 256
+// Last Modified On : Fri Jul 13 18:35:54 2018
+// Update Count     : 257
 //
 
Index: src/Parser/parser.yy
===================================================================
--- src/Parser/parser.yy	(revision 6b8b7673f28eb55cef2a4e2507115188d1cf4829)
+++ src/Parser/parser.yy	(revision 0a7314835850e701278bbf94ddc69891ef88543d)
@@ -2307,8 +2307,10 @@
 		{ $$ = new ExpressionNode( new TypeExpr( maybeMoveBuildType( $1 ) ) ); }
 	| assignment_expression
+		{ SemanticError( yylloc, toString("Expression generic parameters are currently unimplemented: ", $1->build()) ); $$ = nullptr; }
 	| type_list ',' type
 		{ $$ = (ExpressionNode *)( $1->set_last( new ExpressionNode( new TypeExpr( maybeMoveBuildType( $3 ) ) ) ) ); }
 	| type_list ',' assignment_expression
-		{ $$ = (ExpressionNode *)( $1->set_last( $3 )); }
+		{ SemanticError( yylloc, toString("Expression generic parameters are currently unimplemented: ", $3->build()) ); $$ = nullptr; }
+		// { $$ = (ExpressionNode *)( $1->set_last( $3 )); }
 	;
 
Index: src/ResolvExpr/AlternativeFinder.cc
===================================================================
--- src/ResolvExpr/AlternativeFinder.cc	(revision 6b8b7673f28eb55cef2a4e2507115188d1cf4829)
+++ src/ResolvExpr/AlternativeFinder.cc	(revision 0a7314835850e701278bbf94ddc69891ef88543d)
@@ -482,4 +482,5 @@
 	template< typename ForwardIterator, typename OutputIterator >
 	void inferRecursive( ForwardIterator begin, ForwardIterator end, const Alternative &newAlt, OpenVarSet &openVars, const SymTab::Indexer &decls, const AssertionSet &newNeed, int level, const SymTab::Indexer &indexer, OutputIterator out ) {
+		if ( newAlt.cost == Cost::infinity ) return; // don't proceed down this dead end
 		if ( begin == end ) {
 			if ( newNeed.empty() ) {
@@ -1185,4 +1186,5 @@
 				std::cerr << "bindings are:" << std::endl;
 				withFunc.env.print( std::cerr, 8 );
+				std::cerr << "cost is: " << withFunc.cost << std::endl;
 				std::cerr << "cost of conversion is:" << cvtCost << std::endl;
 			)
Index: src/ResolvExpr/CommonType.cc
===================================================================
--- src/ResolvExpr/CommonType.cc	(revision 6b8b7673f28eb55cef2a4e2507115188d1cf4829)
+++ src/ResolvExpr/CommonType.cc	(revision 0a7314835850e701278bbf94ddc69891ef88543d)
@@ -267,5 +267,5 @@
 						result = otherPointer->clone();
 					} // if
-					result->get_qualifiers() = tq1 | tq2;
+					strict_dynamic_cast<PointerType*>(result)->base->get_qualifiers() = tq1 | tq2;
 				} else {
 					/// std::cerr << "place for ptr-to-type" << std::endl;
@@ -304,5 +304,5 @@
 						result = otherRef->clone();
 					} // if
-					result->get_qualifiers() = tq1 | tq2;
+					strict_dynamic_cast<ReferenceType*>(result)->base->get_qualifiers() = tq1 | tq2;
 				} else {
 					/// std::cerr << "place for ptr-to-type" << std::endl;
Index: src/SymTab/FixFunction.cc
===================================================================
--- src/SymTab/FixFunction.cc	(revision 6b8b7673f28eb55cef2a4e2507115188d1cf4829)
+++ src/SymTab/FixFunction.cc	(revision 0a7314835850e701278bbf94ddc69891ef88543d)
@@ -30,4 +30,5 @@
 		// can't delete function type because it may contain assertions, so transfer ownership to new object
 		ObjectDecl *pointer = new ObjectDecl( functionDecl->name, functionDecl->get_storageClasses(), functionDecl->linkage, nullptr, new PointerType( Type::Qualifiers(), functionDecl->type ), nullptr, functionDecl->attributes );
+		pointer->location = functionDecl->location;
 		functionDecl->attributes.clear();
 		functionDecl->type = nullptr;
@@ -43,4 +44,5 @@
 		// need to recursively mutate the base type in order for multi-dimensional arrays to work.
 		PointerType *pointerType = new PointerType( arrayType->get_qualifiers(), arrayType->base, arrayType->dimension, arrayType->isVarLen, arrayType->isStatic );
+		pointerType->location = arrayType->location;
 		arrayType->base = nullptr;
 		arrayType->dimension = nullptr;
Index: src/libcfa/bits/defs.h
===================================================================
--- src/libcfa/bits/defs.h	(revision 6b8b7673f28eb55cef2a4e2507115188d1cf4829)
+++ src/libcfa/bits/defs.h	(revision 0a7314835850e701278bbf94ddc69891ef88543d)
@@ -28,7 +28,7 @@
 
 #ifdef __cforall
-#define __cfa_anonymous_object
+#define __cfa_anonymous_object(x) inline struct x
 #else
-#define __cfa_anonymous_object __cfa_anonymous_object
+#define __cfa_anonymous_object(x) x __cfa_anonymous_object
 #endif
 
Index: src/libcfa/concurrency/invoke.h
===================================================================
--- src/libcfa/concurrency/invoke.h	(revision 6b8b7673f28eb55cef2a4e2507115188d1cf4829)
+++ src/libcfa/concurrency/invoke.h	(revision 0a7314835850e701278bbf94ddc69891ef88543d)
@@ -93,5 +93,5 @@
 
 		// list of acceptable functions, null if any
-		__small_array_t(struct __acceptable_t) __cfa_anonymous_object;
+		__cfa_anonymous_object( __small_array_t(struct __acceptable_t) );
 	};
 
@@ -121,5 +121,5 @@
 	struct __monitor_group_t {
 		// currently held monitors
-		__small_array_t(monitor_desc*) __cfa_anonymous_object;
+		__cfa_anonymous_object( __small_array_t(monitor_desc*) );
 
 		// last function that acquired monitors
Index: src/libcfa/concurrency/monitor
===================================================================
--- src/libcfa/concurrency/monitor	(revision 6b8b7673f28eb55cef2a4e2507115188d1cf4829)
+++ src/libcfa/concurrency/monitor	(revision 0a7314835850e701278bbf94ddc69891ef88543d)
@@ -138,5 +138,5 @@
 
 struct __acceptable_t {
-	__monitor_group_t;
+	inline struct __monitor_group_t;
 	bool is_dtor;
 };
Index: src/libcfa/containers/result
===================================================================
--- src/libcfa/containers/result	(revision 6b8b7673f28eb55cef2a4e2507115188d1cf4829)
+++ src/libcfa/containers/result	(revision 0a7314835850e701278bbf94ddc69891ef88543d)
@@ -28,5 +28,5 @@
 struct result {
 	bool has_value;
-	inner_result(T, E);
+	inline union inner_result(T, E);
 };
 
Index: src/libcfa/interpose.c
===================================================================
--- src/libcfa/interpose.c	(revision 6b8b7673f28eb55cef2a4e2507115188d1cf4829)
+++ src/libcfa/interpose.c	(revision 0a7314835850e701278bbf94ddc69891ef88543d)
@@ -33,4 +33,9 @@
 // Interposing helpers
 //=============================================================================================
+
+void preload_libgcc(void) {
+	dlopen( "libgcc_s.so.1", RTLD_NOW );
+	if ( const char * error = dlerror() ) abort( "interpose_symbol : internal error pre-loading libgcc, %s\n", error );
+}
 
 typedef void (* generic_fptr_t)(void);
@@ -92,4 +97,6 @@
 		const char *version = NULL;
 
+		preload_libgcc();
+
 #pragma GCC diagnostic push
 #pragma GCC diagnostic ignored "-Wdiscarded-qualifiers"
