Index: src/GenPoly/Box.cc
===================================================================
--- src/GenPoly/Box.cc	(revision ae2f2aec69994587af09cbc09f465b978bed879a)
+++ src/GenPoly/Box.cc	(revision 5a076837fe88f7ae75814e4afc7e03da772b8f58)
@@ -1277,5 +1277,6 @@
 			FunctionType * ftype = functionDecl->type;
 			if ( ! ftype->returnVals.empty() && functionDecl->statements ) {
-				if ( ! isPrefix( functionDecl->name, "_thunk" ) && ! isPrefix( functionDecl->name, "_adapter" ) ) { // xxx - remove check for prefix once thunks properly use ctor/dtors
+				// intrinsic functions won't be using the _retval so no need to generate it.
+				if ( functionDecl->linkage != LinkageSpec::Intrinsic && !isPrefix( functionDecl->name, "_thunk" ) && ! isPrefix( functionDecl->name, "_adapter" ) ) { // xxx - remove check for prefix once thunks properly use ctor/dtors
 					assert( ftype->returnVals.size() == 1 );
 					DeclarationWithType * retval = ftype->returnVals.front();
Index: src/Validate/Autogen.cpp
===================================================================
--- src/Validate/Autogen.cpp	(revision ae2f2aec69994587af09cbc09f465b978bed879a)
+++ src/Validate/Autogen.cpp	(revision 5a076837fe88f7ae75814e4afc7e03da772b8f58)
@@ -183,7 +183,9 @@
 	{
 		// TODO: These functions are somewhere between instrinsic and autogen,
-		// could possibly use a new linkage type. For now we just make them
-		// intrinsic to code-gen them as C assignments.
-		proto_linkage = ast::Linkage::Intrinsic;
+		// could possibly use a new linkage type. For now we just make the
+		// basic ones intrinsic to code-gen them as C assignments.
+		const auto & real_type = decl->base;
+		const auto & basic = real_type.as<ast::BasicType>();
+		if(!real_type || (basic && basic->isInteger())) proto_linkage = ast::Linkage::Intrinsic;
 	}
 
@@ -402,8 +404,4 @@
 	auto retval = srcParam();
 	retval->name = "_ret";
-	// xxx - Adding this unused attribute can slience unused variable warning
-	// However, some code might not be compiled as expected
-	// Temporarily disabled
-	// retval->attributes.push_back(new ast::Attribute("unused"));
 	return genProto( "?=?", { dstParam(), srcParam() }, { retval } );
 }
