Index: src/CodeTools/ResolvProtoDump.cc
===================================================================
--- src/CodeTools/ResolvProtoDump.cc	(revision aeb8f70056004f741c9dcb505f8cb1cecb640ff1)
+++ src/CodeTools/ResolvProtoDump.cc	(revision e99e43f290a67032231db42a3e1c62f8c7ba7ca7)
@@ -51,10 +51,10 @@
 
 		/// Child constructor
-		ProtoDump(const ProtoDump* p, Type* r) 
+		ProtoDump(const ProtoDump* p, Type* r)
 			: decls(), exprs(), subs(), closed(p->closed), parent(p), rtnType(r) {}
 
 		// Fix copy issues
-		ProtoDump(const ProtoDump& o) 
-			: decls(o.decls), exprs(o.exprs), subs(o.subs), closed(o.closed), parent(o.parent), 
+		ProtoDump(const ProtoDump& o)
+			: decls(o.decls), exprs(o.exprs), subs(o.subs), closed(o.closed), parent(o.parent),
 			  rtnType(maybeClone(o.rtnType.get())) {}
 		ProtoDump( ProtoDump&& ) = default;
@@ -69,8 +69,8 @@
 			parent = o.parent;
 			rtnType.reset( maybeClone(o.rtnType.get()) );
-			
+
 			return *this;
 		}
-		ProtoDump& operator= (ProtoDump&&) = default;
+		ProtoDump& operator= (ProtoDump&&) = delete;
 
 	private:
@@ -96,5 +96,5 @@
 			subs.emplace_back( std::move(sub.pass) );
 		}
-	
+
 		/// Whether lists should be separated, terminated, or preceded by their separator
 		enum septype { separated, terminated, preceded };
@@ -102,5 +102,5 @@
 		/// builds space-separated list of types
 		template<typename V>
-		static void build( V& visitor, const std::list< Type* >& tys, std::stringstream& ss, 
+		static void build( V& visitor, const std::list< Type* >& tys, std::stringstream& ss,
 				septype mode = separated ) {
 			if ( tys.empty() ) return;
@@ -121,5 +121,5 @@
 		/// builds list of types wrapped as tuple type
 		template<typename V>
-		static void buildAsTuple( V& visitor, const std::list< Type* >& tys, 
+		static void buildAsTuple( V& visitor, const std::list< Type* >& tys,
 				std::stringstream& ss ) {
 			switch ( tys.size() ) {
@@ -162,5 +162,5 @@
 			if ( name.compare( 0, 10, "_operator_" ) == 0 ) {
 				ss << name.substr(10);
-			} else if ( name.compare( "_constructor" ) == 0 
+			} else if ( name.compare( "_constructor" ) == 0
 					|| name.compare( "_destructor" ) == 0 ) {
 				ss << name.substr(1);
@@ -173,5 +173,5 @@
 
 		/// replaces operators with resolv-proto names
-		static void rp_name( const std::string& name, std::stringstream& ss, 
+		static void rp_name( const std::string& name, std::stringstream& ss,
 				std::string&& pre = "" ) {
 			// safety check for anonymous names
@@ -187,6 +187,6 @@
 				op_name( info.outputName, ss );
 				return;
-			} 
-			
+			}
+
 			// replace retval names
 			if ( name.compare( 0, 8, "_retval_" ) == 0 ) {
@@ -195,7 +195,7 @@
 				return;
 			}
-			
+
 			// default to just name, with first character in lowercase
-			ss << pre 
+			ss << pre
 			   << (char)std::tolower( static_cast<unsigned char>(name[0]) )
 			   << (name.c_str() + 1);
@@ -221,5 +221,5 @@
 			// strip trailing "_generic_" from autogen names (avoids some user-generation issues)
 			char generic[] = "_generic_"; size_t n_generic = sizeof(generic) - 1;
-			if ( stripped.size() >= n_generic 
+			if ( stripped.size() >= n_generic
 					&& stripped.substr( stripped.size() - n_generic ) == generic ) {
 				stripped.resize( stripped.size() - n_generic );
@@ -237,5 +237,5 @@
 			unsigned depth;                                 ///< Depth of nesting from root type
 
-			TypePrinter( const std::unordered_set<std::string>& closed, std::stringstream& ss ) 
+			TypePrinter( const std::unordered_set<std::string>& closed, std::stringstream& ss )
 				: ss(ss), closed(closed), depth(0) {}
 
@@ -337,5 +337,5 @@
 			}
 		};
-	
+
 		/// builds description of function
 		void build( const std::string& name, FunctionType* fnTy, std::stringstream& ss ) {
@@ -350,5 +350,5 @@
 			for ( TypeDecl* tyvar : fnTy->forall ) {
 				for ( DeclarationWithType* assn : tyvar->assertions ) {
-					ss << " | "; 
+					ss << " | ";
 					build( assn->name, assn->get_type(), ss );
 				}
@@ -360,5 +360,5 @@
 			// ignore top-level references
 			Type *norefs = ty->stripReferences();
-			
+
 			// fall back to function declaration if function type
 			if ( PointerType* pTy = dynamic_cast< PointerType* >(norefs) ) {
@@ -409,5 +409,5 @@
 			std::stringstream& ss;                          ///< Output to print to
 
-			ExprPrinter( const std::unordered_set<std::string>& closed, std::stringstream& ss ) 
+			ExprPrinter( const std::unordered_set<std::string>& closed, std::stringstream& ss )
 				: closed(closed), ss(ss) {}
 
@@ -476,5 +476,5 @@
 				visit_children = false;
 			}
-			
+
 			/// Member access handled as function from aggregate to member
 			void previsit( UntypedMemberExpr* expr ) {
@@ -662,5 +662,5 @@
 					}
 				}
-				
+
 				// add named parameters and returns to local scope
 				body.pass.addAll( decl->type->returnVals );
@@ -679,9 +679,9 @@
 		void previsit( StructDecl* sd ) { addAggregateFields(sd); }
 		void previsit( UnionDecl* ud ) { addAggregateFields(ud); }
-		
+
 		void previsit( EnumDecl* ed ) {
-			std::unique_ptr<Type> eType = 
+			std::unique_ptr<Type> eType =
 				std::make_unique<BasicType>( Type::Qualifiers{}, BasicType::SignedInt );
-			
+
 			// add field names directly to enclosing scope
 			for ( Declaration* member : ed->members ) {
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision aeb8f70056004f741c9dcb505f8cb1cecb640ff1)
+++ src/Makefile.am	(revision e99e43f290a67032231db42a3e1c62f8c7ba7ca7)
@@ -17,4 +17,5 @@
 # create object files in directory with source files
 AUTOMAKE_OPTIONS = foreign subdir-objects
+ACLOCAL_AMFLAGS  = -I automake
 
 SRC = main.cc \
Index: src/Makefile.in
===================================================================
--- src/Makefile.in	(revision aeb8f70056004f741c9dcb505f8cb1cecb640ff1)
+++ src/Makefile.in	(revision e99e43f290a67032231db42a3e1c62f8c7ba7ca7)
@@ -141,6 +141,10 @@
 subdir = src
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/automake/cfa.m4 \
-	$(top_srcdir)/configure.ac
+am__aclocal_m4_deps = $(top_srcdir)/automake/libtool.m4 \
+	$(top_srcdir)/automake/ltoptions.m4 \
+	$(top_srcdir)/automake/ltsugar.m4 \
+	$(top_srcdir)/automake/ltversion.m4 \
+	$(top_srcdir)/automake/lt~obsolete.m4 \
+	$(top_srcdir)/automake/cfa.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
@@ -151,5 +155,4 @@
 CONFIG_CLEAN_VPATH_FILES =
 LIBRARIES = $(noinst_LIBRARIES)
-AR = ar
 AM_V_AR = $(am__v_AR_@AM_V@)
 am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
@@ -295,4 +298,8 @@
 ___driver_cfa_cpp_OBJECTS = $(am____driver_cfa_cpp_OBJECTS)
 ___driver_cfa_cpp_DEPENDENCIES =
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
 am_demangler_OBJECTS = SymTab/demangler.$(OBJEXT)
 demangler_OBJECTS = $(am_demangler_OBJECTS)
@@ -316,4 +323,8 @@
 CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
 	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CXXFLAGS) $(CXXFLAGS)
 AM_V_CXX = $(am__v_CXX_@AM_V@)
 am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
@@ -321,6 +332,7 @@
 am__v_CXX_1 = 
 CXXLD = $(CXX)
-CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
-	-o $@
+CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
+	$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
 AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
 am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
@@ -328,4 +340,6 @@
 am__v_CXXLD_1 = 
 LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS)
+LTLEXCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS)
 AM_V_LEX = $(am__v_LEX_@AM_V@)
 am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@)
@@ -336,4 +350,6 @@
 		   -e s/c++$$/h++/ -e s/c$$/h/
 YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS)
+LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS)
 AM_V_YACC = $(am__v_YACC_@AM_V@)
 am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@)
@@ -342,4 +358,8 @@
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
 AM_V_CC = $(am__v_CC_@AM_V@)
 am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
@@ -347,5 +367,7 @@
 am__v_CC_1 = 
 CCLD = $(CC)
-LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
 AM_V_CCLD = $(am__v_CCLD_@AM_V@)
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
@@ -397,9 +419,9 @@
 AMTAR = @AMTAR@
 AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 AUTOMAKE = @AUTOMAKE@
 AWK = @AWK@
-BACKEND_CC = @BACKEND_CC@
 BUILD_IN_TREE_FLAGS = @BUILD_IN_TREE_FLAGS@
 CC = @CC@
@@ -421,4 +443,5 @@
 CPPFLAGS = @CPPFLAGS@
 CXX = @CXX@
+CXXCPP = @CXXCPP@
 CXXDEPMODE = @CXXDEPMODE@
 CXXFLAGS = @CXXFLAGS@
@@ -426,5 +449,8 @@
 DEFS = @DEFS@
 DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
 DRIVER_DIR = @DRIVER_DIR@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
 ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
@@ -432,4 +458,5 @@
 EGREP = @EGREP@
 EXEEXT = @EXEEXT@
+FGREP = @FGREP@
 GREP = @GREP@
 HOST_FLAGS = @HOST_FLAGS@
@@ -439,4 +466,5 @@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LD = @LD@
 LDFLAGS = @LDFLAGS@
 LEX = @LEX@
@@ -447,8 +475,18 @@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
 LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
 MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
 MKDIR_P = @MKDIR_P@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
 OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -460,4 +498,5 @@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 RANLIB = @RANLIB@
+SED = @SED@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -471,6 +510,8 @@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
 ac_ct_CC = @ac_ct_CC@
 ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
 am__include = @am__include@
 am__leading_dot = @am__leading_dot@
@@ -522,4 +563,5 @@
 # create object files in directory with source files
 AUTOMAKE_OPTIONS = foreign subdir-objects
+ACLOCAL_AMFLAGS = -I automake
 SRC = main.cc MakeLibCfa.cc CompilationState.cc CodeGen/Generate.cc \
 	CodeGen/CodeGenerator.cc CodeGen/GenType.cc \
@@ -681,5 +723,5 @@
 
 .SUFFIXES:
-.SUFFIXES: .cc .ll .o .obj .yy
+.SUFFIXES: .cc .ll .lo .o .obj .yy
 $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(srcdir)/CodeGen/module.mk $(srcdir)/CodeTools/module.mk $(srcdir)/Concurrency/module.mk $(srcdir)/Common/module.mk $(srcdir)/ControlStruct/module.mk $(srcdir)/GenPoly/module.mk $(srcdir)/InitTweak/module.mk $(srcdir)/Parser/module.mk $(srcdir)/ResolvExpr/module.mk $(srcdir)/SymTab/module.mk $(srcdir)/SynTree/module.mk $(srcdir)/Tuples/module.mk $(srcdir)/Validate/module.mk $(srcdir)/Virtual/module.mk $(am__configure_deps)
 	@for dep in $?; do \
@@ -970,4 +1012,5 @@
 	sed 's/$(EXEEXT)$$//' | \
 	while read p p1; do if test -f $$p \
+	 || test -f $$p1 \
 	  ; then echo "$$p"; echo "$$p"; else :; fi; \
 	done | \
@@ -984,6 +1027,6 @@
 	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
 	    test -z "$$files" || { \
-	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(cfa_cpplibdir)$$dir'"; \
-	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(cfa_cpplibdir)$$dir" || exit $$?; \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(cfa_cpplibdir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(cfa_cpplibdir)$$dir" || exit $$?; \
 	    } \
 	; done
@@ -1001,5 +1044,11 @@
 
 clean-cfa_cpplibPROGRAMS:
-	-test -z "$(cfa_cpplib_PROGRAMS)" || rm -f $(cfa_cpplib_PROGRAMS)
+	@list='$(cfa_cpplib_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
 CodeGen/Generate.$(OBJEXT): CodeGen/$(am__dirstamp) \
 	CodeGen/$(DEPDIR)/$(am__dirstamp)
@@ -1241,4 +1290,12 @@
 @am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 
+.cc.lo:
+@am__fastdepCXX_TRUE@	$(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCXX_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	$(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@	$(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
+
 .ll.cc:
 	$(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE)
@@ -1246,4 +1303,11 @@
 .yy.cc:
 	$(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE)
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf ../driver/.libs ../driver/_libs
 
 ID: $(am__tagged_files)
@@ -1405,6 +1469,6 @@
 clean: clean-am
 
-clean-am: clean-cfa_cpplibPROGRAMS clean-generic clean-noinstLIBRARIES \
-	mostlyclean-am
+clean-am: clean-cfa_cpplibPROGRAMS clean-generic clean-libtool \
+	clean-noinstLIBRARIES mostlyclean-am
 
 distclean: distclean-am
@@ -1461,5 +1525,6 @@
 mostlyclean: mostlyclean-am
 
-mostlyclean-am: mostlyclean-compile mostlyclean-generic
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
 
 pdf: pdf-am
@@ -1476,16 +1541,17 @@
 
 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
-	clean-cfa_cpplibPROGRAMS clean-generic clean-noinstLIBRARIES \
-	cscopelist-am ctags ctags-am distclean distclean-compile \
-	distclean-generic distclean-tags distdir dvi dvi-am html \
-	html-am info info-am install install-am \
-	install-cfa_cpplibPROGRAMS install-data install-data-am \
-	install-dvi install-dvi-am install-exec install-exec-am \
-	install-html install-html-am install-info install-info-am \
-	install-man install-pdf install-pdf-am install-ps \
-	install-ps-am install-strip installcheck installcheck-am \
-	installdirs maintainer-clean maintainer-clean-generic \
-	mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
-	ps ps-am tags tags-am uninstall uninstall-am \
+	clean-cfa_cpplibPROGRAMS clean-generic clean-libtool \
+	clean-noinstLIBRARIES cscopelist-am ctags ctags-am distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-tags distdir dvi dvi-am html html-am info info-am \
+	install install-am install-cfa_cpplibPROGRAMS install-data \
+	install-data-am install-dvi install-dvi-am install-exec \
+	install-exec-am install-html install-html-am install-info \
+	install-info-am install-man install-pdf install-pdf-am \
+	install-ps install-ps-am install-strip installcheck \
+	installcheck-am installdirs maintainer-clean \
+	maintainer-clean-generic mostlyclean mostlyclean-compile \
+	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+	tags tags-am uninstall uninstall-am \
 	uninstall-cfa_cpplibPROGRAMS
 
Index: src/Parser/DeclarationNode.cc
===================================================================
--- src/Parser/DeclarationNode.cc	(revision aeb8f70056004f741c9dcb505f8cb1cecb640ff1)
+++ src/Parser/DeclarationNode.cc	(revision e99e43f290a67032231db42a3e1c62f8c7ba7ca7)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 12:34:05 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Jul 20 14:56:54 2018
-// Update Count     : 1107
+// Last Modified On : Thu Nov  1 20:54:26 2018
+// Update Count     : 1108
 //
 
@@ -402,7 +402,7 @@
 }
 
-DeclarationNode * DeclarationNode::newTypeof( ExpressionNode * expr ) {
-	DeclarationNode * newnode = new DeclarationNode;
-	newnode->type = new TypeData( TypeData::Typeof );
+DeclarationNode * DeclarationNode::newTypeof( ExpressionNode * expr, bool basetypeof ) {
+	DeclarationNode * newnode = new DeclarationNode;
+	newnode->type = new TypeData( basetypeof ? TypeData::Basetypeof : TypeData::Typeof );
 	newnode->type->typeexpr = expr;
 	return newnode;
Index: src/Parser/ParseNode.h
===================================================================
--- src/Parser/ParseNode.h	(revision aeb8f70056004f741c9dcb505f8cb1cecb640ff1)
+++ src/Parser/ParseNode.h	(revision e99e43f290a67032231db42a3e1c62f8c7ba7ca7)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 13:28:16 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Aug  4 09:39:40 2018
-// Update Count     : 853
+// Last Modified On : Thu Nov  1 20:54:53 2018
+// Update Count     : 854
 //
 
@@ -249,5 +249,5 @@
 	static DeclarationNode * newBitfield( ExpressionNode * size );
 	static DeclarationNode * newTuple( DeclarationNode * members );
-	static DeclarationNode * newTypeof( ExpressionNode * expr );
+	static DeclarationNode * newTypeof( ExpressionNode * expr, bool basetypeof = false );
 	static DeclarationNode * newAttr( const std::string *, ExpressionNode * expr ); // @ attributes
 	static DeclarationNode * newAttr( const std::string *, DeclarationNode * type ); // @ attributes
Index: src/Parser/TypeData.cc
===================================================================
--- src/Parser/TypeData.cc	(revision aeb8f70056004f741c9dcb505f8cb1cecb640ff1)
+++ src/Parser/TypeData.cc	(revision e99e43f290a67032231db42a3e1c62f8c7ba7ca7)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 15:12:51 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Jul 20 14:39:31 2018
-// Update Count     : 622
+// Last Modified On : Fri Nov  2 07:54:26 2018
+// Update Count     : 624
 //
 
@@ -96,4 +96,5 @@
 		break;
 	  case Typeof:
+	  case Basetypeof:
 		// typeexpr = new Typeof_t;
 		typeexpr = nullptr;
@@ -166,4 +167,5 @@
 		break;
 	  case Typeof:
+	  case Basetypeof:
 		// delete typeexpr->expr;
 		delete typeexpr;
@@ -245,4 +247,5 @@
 		break;
 	  case Typeof:
+	  case Basetypeof:
 		newtype->typeexpr = maybeClone( typeexpr );
 		break;
@@ -419,4 +422,9 @@
 		} // if
 		break;
+	  case Basetypeof:
+		os << "base-";
+		#if defined(__GNUC__) && __GNUC__ >= 7
+			__attribute__((fallthrough));
+		#endif
 	  case Typeof:
 		os << "type-of expression ";
@@ -457,4 +465,5 @@
 	  case Tuple:
 	  case Typeof:
+	  case Basetypeof:
 	  case Builtin:
 		assertf(false, "Tried to get leaf name from kind without a name: %d", kind);
@@ -513,45 +522,46 @@
 	switch ( td->kind ) {
 	  case TypeData::Unknown:
-		// fill in implicit int
-		return new BasicType( buildQualifiers( td ), BasicType::SignedInt );
+			// fill in implicit int
+			return new BasicType( buildQualifiers( td ), BasicType::SignedInt );
 	  case TypeData::Basic:
-		return buildBasicType( td );
+			return buildBasicType( td );
 	  case TypeData::Pointer:
-		return buildPointer( td );
+			return buildPointer( td );
 	  case TypeData::Array:
-		return buildArray( td );
+			return buildArray( td );
 	  case TypeData::Reference:
-		return buildReference( td );
+			return buildReference( td );
 	  case TypeData::Function:
-		return buildFunction( td );
+			return buildFunction( td );
 	  case TypeData::AggregateInst:
-		return buildAggInst( td );
+			return buildAggInst( td );
 	  case TypeData::EnumConstant:
-		// the name gets filled in later -- by SymTab::Validate
-		return new EnumInstType( buildQualifiers( td ), "" );
+			// the name gets filled in later -- by SymTab::Validate
+			return new EnumInstType( buildQualifiers( td ), "" );
 	  case TypeData::SymbolicInst:
-		return buildSymbolicInst( td );
+			return buildSymbolicInst( td );
 	  case TypeData::Tuple:
-		return buildTuple( td );
+			return buildTuple( td );
 	  case TypeData::Typeof:
-		return buildTypeof( td );
+	  case TypeData::Basetypeof:
+			return buildTypeof( td );
 	  case TypeData::Builtin:
-		if(td->builtintype == DeclarationNode::Zero) {
-			return new ZeroType( noQualifiers );
-		}
-		else if(td->builtintype == DeclarationNode::One) {
-			return new OneType( noQualifiers );
-		}
-		else {
-			return new VarArgsType( buildQualifiers( td ) );
-		}
+			if (td->builtintype == DeclarationNode::Zero) {
+				return new ZeroType( noQualifiers );
+			}
+			else if (td->builtintype == DeclarationNode::One) {
+				return new OneType( noQualifiers );
+			}
+			else {
+				return new VarArgsType( buildQualifiers( td ) );
+			}
 	  case TypeData::GlobalScope:
-		return new GlobalScopeType();
+			return new GlobalScopeType();
 		case TypeData::Qualified:
-		return new QualifiedType( buildQualifiers( td ), typebuild( td->qualified.parent ), typebuild( td->qualified.child ) );
+			return new QualifiedType( buildQualifiers( td ), typebuild( td->qualified.parent ), typebuild( td->qualified.child ) );
 	  case TypeData::Symbolic:
 	  case TypeData::Enum:
 	  case TypeData::Aggregate:
-		assert( false );
+			assert( false );
 	} // switch
 
@@ -929,8 +939,9 @@
 
 TypeofType * buildTypeof( const TypeData * td ) {
-	assert( td->kind == TypeData::Typeof );
+	assert( td->kind == TypeData::Typeof || td->kind == TypeData::Basetypeof );
 	assert( td->typeexpr );
 	// assert( td->typeexpr->expr );
-	return new TypeofType( buildQualifiers( td ), td->typeexpr->build() );
+	return new TypeofType{ 
+		buildQualifiers( td ), td->typeexpr->build(), td->kind == TypeData::Basetypeof };
 } // buildTypeof
 
Index: src/Parser/TypeData.h
===================================================================
--- src/Parser/TypeData.h	(revision aeb8f70056004f741c9dcb505f8cb1cecb640ff1)
+++ src/Parser/TypeData.h	(revision e99e43f290a67032231db42a3e1c62f8c7ba7ca7)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 15:18:36 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Jul 20 13:56:40 2018
-// Update Count     : 195
+// Last Modified On : Thu Nov  1 20:56:46 2018
+// Update Count     : 196
 //
 
@@ -27,5 +27,5 @@
 struct TypeData {
 	enum Kind { Basic, Pointer, Reference, Array, Function, Aggregate, AggregateInst, Enum, EnumConstant, Symbolic,
-				SymbolicInst, Tuple, Typeof, Builtin, GlobalScope, Qualified, Unknown };
+				SymbolicInst, Tuple, Typeof, Basetypeof, Builtin, GlobalScope, Qualified, Unknown };
 
 	struct Aggregate_t {
Index: src/Parser/lex.ll
===================================================================
--- src/Parser/lex.ll	(revision aeb8f70056004f741c9dcb505f8cb1cecb640ff1)
+++ src/Parser/lex.ll	(revision e99e43f290a67032231db42a3e1c62f8c7ba7ca7)
@@ -10,6 +10,6 @@
  * Created On       : Sat Sep 22 08:58:10 2001
  * Last Modified By : Peter A. Buhr
- * Last Modified On : Wed Aug 29 15:02:41 2018
- * Update Count     : 686
+ * Last Modified On : Thu Nov  1 20:57:35 2018
+ * Update Count     : 687
  */
 
@@ -209,4 +209,5 @@
 __attribute__	{ KEYWORD_RETURN(ATTRIBUTE); }			// GCC
 auto			{ KEYWORD_RETURN(AUTO); }
+basetypeof		{ KEYWORD_RETURN(BASETYPEOF); }			// CFA
 _Bool			{ KEYWORD_RETURN(BOOL); }				// C99
 break			{ KEYWORD_RETURN(BREAK); }
Index: src/Parser/parser.yy
===================================================================
--- src/Parser/parser.yy	(revision aeb8f70056004f741c9dcb505f8cb1cecb640ff1)
+++ src/Parser/parser.yy	(revision e99e43f290a67032231db42a3e1c62f8c7ba7ca7)
@@ -10,6 +10,6 @@
 // Created On       : Sat Sep  1 20:22:55 2001
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Aug 30 17:02:25 2018
-// Update Count     : 4029
+// Last Modified On : Thu Nov  8 18:08:23 2018
+// Update Count     : 4052
 //
 
@@ -186,17 +186,22 @@
 } // fieldDecl
 
-ExpressionNode *forInc( const OperKinds op ) {
-	return new ExpressionNode( build_constantInteger( *new string( op == OperKinds::LThan || op == OperKinds::LEThan ? "1" : "-1" ) ) );
-} // forInc
-
 ForCtrl * forCtrl( ExpressionNode * type, string * index, ExpressionNode * start, enum OperKinds compop, ExpressionNode * comp, ExpressionNode * inc ) {
-	ConstantExpr *constant = dynamic_cast<ConstantExpr *>(type->get_expr());
+	ConstantExpr * constant = dynamic_cast<ConstantExpr *>(type->get_expr());
 	if ( constant && (constant->get_constant()->get_value() == "0" || constant->get_constant()->get_value() == "1") ) {
     	type = new ExpressionNode( new CastExpr( maybeMoveBuild< Expression >(type), new BasicType( Type::Qualifiers(), BasicType::SignedInt ) ) );
 	} // if
 	return new ForCtrl(
-		distAttr( DeclarationNode::newTypeof( type ), DeclarationNode::newName( index )->addInitializer( new InitializerNode( start ) ) ),
+		distAttr( DeclarationNode::newTypeof( type, true ), DeclarationNode::newName( index )->addInitializer( new InitializerNode( start ) ) ),
 		new ExpressionNode( build_binary_val( compop, new ExpressionNode( build_varref( new string( *index ) ) ), comp ) ),
-		new ExpressionNode( build_binary_val( OperKinds::PlusAssn, new ExpressionNode( build_varref( new string( *index ) ) ), inc ) ) );
+		new ExpressionNode( build_binary_val( compop == OperKinds::LThan || compop == OperKinds::LEThan ? // choose += or -= for upto/downto
+											  OperKinds::PlusAssn : OperKinds::MinusAssn, new ExpressionNode( build_varref( new string( *index ) ) ), inc ) ) );
+} // forCtrl
+
+ForCtrl * forCtrl( ExpressionNode * type, ExpressionNode * index, ExpressionNode * start, enum OperKinds compop, ExpressionNode * comp, ExpressionNode * inc ) {
+	if ( NameExpr * identifier = dynamic_cast<NameExpr *>(index->get_expr()) ) {
+		return forCtrl( type, new string( identifier->name ), start, compop, comp, inc );
+	} else {
+		SemanticError( yylloc, "Expression disallowed. Only loop-index name allowed" ); return nullptr;
+	} // if
 } // forCtrl
 
@@ -261,5 +266,5 @@
 %token ZERO_T ONE_T										// CFA
 %token VALIST											// GCC
-%token TYPEOF LABEL										// GCC
+%token TYPEOF BASETYPEOF LABEL							// GCC
 %token ENUM STRUCT UNION
 %token EXCEPTION										// CFA
@@ -636,7 +641,5 @@
 		{ $$ = new ExpressionNode( build_fieldSel( $1, build_tuple( $4 ) ) ); }
 	| postfix_expression ARROW no_attr_identifier
-		{
-			$$ = new ExpressionNode( build_pfieldSel( $1, *$3 == "0" || *$3 == "1" ? build_constantInteger( *$3 ) : build_varref( $3 ) ) );
-		}
+		{ $$ = new ExpressionNode( build_pfieldSel( $1, build_varref( $3 ) ) ); }
 	| postfix_expression ARROW INTEGERconstant			// CFA, tuple index
 		{ $$ = new ExpressionNode( build_pfieldSel( $1, build_constantInteger( *$3 ) ) ); }
@@ -1137,61 +1140,27 @@
 	| FOR '(' push for_control_expression ')' statement pop
 		{ $$ = new StatementNode( build_for( $4, $6 ) ); }
+	| FOR '(' ')' statement								// CFA => for ( ;; )
+		{ $$ = new StatementNode( build_for( new ForCtrl( (ExpressionNode * )nullptr, (ExpressionNode * )nullptr, (ExpressionNode * )nullptr ), $4 ) ); }
 	;
 
 for_control_expression:
-	comma_expression_opt								// CFA
-		{
-			if ( ! $1 ) {								// => for ( ;; )
-				$$ = new ForCtrl( (ExpressionNode * )nullptr, (ExpressionNode * )nullptr, (ExpressionNode * )nullptr );
-			} else {
-				$$ = forCtrl( $1, new string( DeclarationNode::anonymous.newName() ), new ExpressionNode( build_constantInteger( *new string( "0" ) ) ),
-							  OperKinds::LThan, $1->clone(), forInc( OperKinds::LThan ) );
-			} // if
-		}
+	comma_expression									// CFA
+		{ $$ = forCtrl( $1, new string( DeclarationNode::anonymous.newName() ), new ExpressionNode( build_constantInteger( *new string( "0" ) ) ),
+						OperKinds::LThan, $1->clone(), new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) ); }
 	| constant_expression inclexcl constant_expression	// CFA
-		{ $$ = forCtrl( $1, new string( DeclarationNode::anonymous.newName() ), $1->clone(), $2, $3, forInc( $2 ) ); }
+		{ $$ = forCtrl( $1, new string( DeclarationNode::anonymous.newName() ), $1->clone(), $2, $3, new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) ); }
 	| constant_expression inclexcl constant_expression '~' constant_expression // CFA
 		{ $$ = forCtrl( $1, new string( DeclarationNode::anonymous.newName() ), $1->clone(), $2, $3, $5 ); }
-	| comma_expression_opt ';' comma_expression			// CFA
-		{
-			if ( ! $1 ) {
-				SemanticError( yylloc, "Missing loop index." ); $$ = nullptr;
-			} else if ( ! $3 ) {
-				SemanticError( yylloc, "Missing loop range." ); $$ = nullptr;
-			} else {
-				if ( NameExpr *identifier = dynamic_cast<NameExpr *>($1->get_expr()) ) {
-					$$ = forCtrl( $3, new string( identifier->name ), new ExpressionNode( build_constantInteger( *new string( "0" ) ) ),
-								  OperKinds::LThan, $3->clone(), forInc( OperKinds::LThan ) );
-				} else {
-					SemanticError( yylloc, "Expression disallowed. Only loop-index name allowed" ); $$ = nullptr;
-				} // if
-			} // if
-		}
-	| comma_expression_opt ';' constant_expression inclexcl constant_expression // CFA
-		{
-			if ( ! $1 ) {
-				SemanticError( yylloc, "Missing loop index." ); $$ = nullptr;
-			} else {
-				if ( NameExpr *identifier = dynamic_cast<NameExpr *>($1->get_expr()) ) {
-					$$ = forCtrl( $3, new string( identifier->name ), $3->clone(), $4, $5, forInc( $4 ) );
-				} else {
-					SemanticError( yylloc, "Expression disallowed. Only loop-index name allowed" ); $$ = nullptr;
-				} // if
-			} // if
-		}
-	| comma_expression_opt ';' constant_expression inclexcl constant_expression '~' constant_expression // CFA
-		{
-			if ( ! $1 ) {
-				SemanticError( yylloc, "Missing loop index." ); $$ = nullptr;
-			} else {
-				if ( NameExpr *identifier = dynamic_cast<NameExpr *>($1->get_expr()) ) {
-					$$ = forCtrl( $3, new string( identifier->name ), $3->clone(), $4, $5, $7 );
-				} else {
-					SemanticError( yylloc, "Expression disallowed. Only loop-index name allowed" ); $$ = nullptr;
-				} // if
-			} // if
-		}
-	| comma_expression_opt ';' comma_expression_opt ';' comma_expression_opt
+	| comma_expression ';' comma_expression				// CFA
+		{ $$ = forCtrl( $3, $1, new ExpressionNode( build_constantInteger( *new string( "0" ) ) ),
+						OperKinds::LThan, $3->clone(), new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) ); }
+	| comma_expression ';' constant_expression inclexcl constant_expression // CFA
+		{ $$ = forCtrl( $3, $1, $3->clone(), $4, $5, new ExpressionNode( build_constantInteger( *new string( "1" ) ) ) ); }
+	| comma_expression ';' constant_expression inclexcl constant_expression '~' constant_expression // CFA
+		{ $$ = forCtrl( $3, $1, $3->clone(), $4, $5, $7 ); }
+	| comma_expression ';' comma_expression_opt ';' comma_expression_opt
 		{ $$ = new ForCtrl( $1, $3, $5 ); }
+	| ';' comma_expression_opt ';' comma_expression_opt
+		{ $$ = new ForCtrl( (ExpressionNode * )nullptr, $2, $4 ); }
 	| declaration comma_expression_opt ';' comma_expression_opt // C99, declaration has ';'
 		{ $$ = new ForCtrl( $1, $2, $4 ); }
@@ -1855,11 +1824,15 @@
 
 indirect_type:
-	TYPEOF '(' type ')'									// GCC: typeof(x) y;
+	TYPEOF '(' type ')'									// GCC: typeof( x ) y;
 		{ $$ = $3; }
-	| TYPEOF '(' comma_expression ')'					// GCC: typeof(a+b) y;
+	| TYPEOF '(' comma_expression ')'					// GCC: typeof( a+b ) y;
 		{ $$ = DeclarationNode::newTypeof( $3 ); }
-	| ATTR_TYPEGENname '(' type ')'						// CFA: e.g., @type(x) y;
+	| BASETYPEOF '(' type ')'							// CFA: basetypeof( x ) y;
+		{ $$ = DeclarationNode::newTypeof( new ExpressionNode( new TypeExpr( maybeMoveBuildType( $3 ) ) ), true ); }
+	| BASETYPEOF '(' comma_expression ')'				// CFA: basetypeof( a+b ) y;
+		{ $$ = DeclarationNode::newTypeof( $3, true ); }
+	| ATTR_TYPEGENname '(' type ')'						// CFA: e.g., @type( x ) y;
 		{ $$ = DeclarationNode::newAttr( $1, $3 ); }
-	| ATTR_TYPEGENname '(' comma_expression ')'			// CFA: e.g., @type(a+b) y;
+	| ATTR_TYPEGENname '(' comma_expression ')'			// CFA: e.g., @type( a+b ) y;
 		{ $$ = DeclarationNode::newAttr( $1, $3 ); }
 	| ZERO_T											// CFA
Index: src/ResolvExpr/Alternative.cc
===================================================================
--- src/ResolvExpr/Alternative.cc	(revision aeb8f70056004f741c9dcb505f8cb1cecb640ff1)
+++ src/ResolvExpr/Alternative.cc	(revision e99e43f290a67032231db42a3e1c62f8c7ba7ca7)
@@ -120,5 +120,5 @@
 			os << "Null expression!" << std::endl;
 		} // if
-		os << indent << "Environment: ";
+		os << indent << "Environment:";
 		env.print( os, indent+1 );
 		os << std::endl;
Index: src/ResolvExpr/AlternativeFinder.cc
===================================================================
--- src/ResolvExpr/AlternativeFinder.cc	(revision aeb8f70056004f741c9dcb505f8cb1cecb640ff1)
+++ src/ResolvExpr/AlternativeFinder.cc	(revision e99e43f290a67032231db42a3e1c62f8c7ba7ca7)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Sat May 16 23:52:08 2015
-// Last Modified By : Aaron B. Moss
-// Last Modified On : Fri Oct -5 10:01:00 2018
-// Update Count     : 34
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Thu Nov  1 21:00:56 2018
+// Update Count     : 35
 //
 
@@ -500,111 +500,6 @@
 				needAssertions[ *assert ].isUsed = true;
 			}
-///     needAssertions.insert( needAssertions.end(), (*tyvar)->get_assertions().begin(), (*tyvar)->get_assertions().end() );
-		}
-	}
-
-// 	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() ) {
-// 				PRINT(
-// 					std::cerr << "all assertions satisfied, output alternative: ";
-// 					newAlt.print( std::cerr );
-// 					std::cerr << std::endl;
-// 				);
-// 				*out++ = newAlt;
-// 				return;
-// 			} else if ( level >= recursionLimit ) {
-// 				SemanticError( newAlt.expr->location, "Too many recursive assertions" );
-// 			} else {
-// 				AssertionSet newerNeed;
-// 				PRINT(
-// 					std::cerr << "recursing with new set:" << std::endl;
-// 					printAssertionSet( newNeed, std::cerr, 8 );
-// 				)
-// 				inferRecursive( newNeed.begin(), newNeed.end(), newAlt, openVars, decls, newerNeed, level+1, indexer, out );
-// 				return;
-// 			}
-// 		}
-
-// 		ForwardIterator cur = begin++;
-// 		if ( ! cur->second.isUsed ) {
-// 			inferRecursive( begin, end, newAlt, openVars, decls, newNeed, level, indexer, out );
-// 			return; // xxx - should this continue? previously this wasn't here, and it looks like it should be
-// 		}
-// 		DeclarationWithType *curDecl = cur->first;
-
-// 		PRINT(
-// 			std::cerr << "inferRecursive: assertion is ";
-// 			curDecl->print( std::cerr );
-// 			std::cerr << std::endl;
-// 		)
-// 		std::list< SymTab::Indexer::IdData > candidates;
-// 		decls.lookupId( curDecl->get_name(), candidates );
-// ///   if ( candidates.empty() ) { std::cerr << "no candidates!" << std::endl; }
-// 		for ( const auto & data : candidates ) {
-// 			DeclarationWithType * candidate = data.id;
-// 			PRINT(
-// 				std::cerr << "inferRecursive: candidate is ";
-// 				candidate->print( std::cerr );
-// 				std::cerr << std::endl;
-// 			)
-
-// 			AssertionSet newHave, newerNeed( newNeed );
-// 			TypeEnvironment newEnv( newAlt.env );
-// 			OpenVarSet newOpenVars( openVars );
-// 			Type *adjType = candidate->get_type()->clone();
-// 			adjustExprType( adjType, newEnv, indexer );
-// 			renameTyVars( adjType );
-// 			PRINT(
-// 				std::cerr << "unifying ";
-// 				curDecl->get_type()->print( std::cerr );
-// 				std::cerr << " with ";
-// 				adjType->print( std::cerr );
-// 				std::cerr << std::endl;
-// 			)
-// 			if ( unify( curDecl->get_type(), adjType, newEnv, newerNeed, newHave, newOpenVars, indexer ) ) {
-// 				PRINT(
-// 					std::cerr << "success!" << std::endl;
-// 				)
-// 				SymTab::Indexer newDecls( decls );
-// 				addToIndexer( newHave, newDecls );
-// 				Alternative newerAlt( newAlt );
-// 				newerAlt.env = newEnv;
-// 				assertf( candidate->get_uniqueId(), "Assertion candidate does not have a unique ID: %s", toString( candidate ).c_str() );
-
-// 				// everything with an empty idChain was pulled in by the current assertion.
-// 				// add current assertion's idChain + current assertion's ID so that the correct inferParameters can be found.
-// 				for ( auto & a : newerNeed ) {
-// 					if ( a.second.idChain.empty() ) {
-// 						a.second.idChain = cur->second.idChain;
-// 						a.second.idChain.push_back( curDecl->get_uniqueId() );
-// 					}
-// 				}
-
-// 				Expression *varExpr = data.combine( newerAlt.cvtCost );
-// 				delete varExpr->get_result();
-// 				varExpr->set_result( adjType->clone() );
-// 				PRINT(
-// 					std::cerr << "satisfying assertion " << curDecl->get_uniqueId() << " ";
-// 					curDecl->print( std::cerr );
-// 					std::cerr << " with declaration " << candidate->get_uniqueId() << " ";
-// 					candidate->print( std::cerr );
-// 					std::cerr << std::endl;
-// 				)
-// 				// follow the current assertion's ID chain to find the correct set of inferred parameters to add the candidate to (i.e. the set of inferred parameters belonging to the entity which requested the assertion parameter).
-// 				InferredParams * inferParameters = &newerAlt.expr->inferParams;
-// 				for ( UniqueId id : cur->second.idChain ) {
-// 					inferParameters = (*inferParameters)[ id ].inferParams.get();
-// 				}
-// 				// XXX: this is a memory leak, but adjType can't be deleted because it might contain assertions
-// 				(*inferParameters)[ curDecl->get_uniqueId() ] = ParamEntry( candidate->get_uniqueId(), adjType->clone(), curDecl->get_type()->clone(), varExpr );
-// 				inferRecursive( begin, end, newerAlt, newOpenVars, newDecls, newerNeed, level, indexer, out );
-// 			} else {
-// 				delete adjType;
-// 			}
-// 		}
-// 	}
+		}
+	}
 
 	/// Unique identifier for matching expression resolutions to their requesting expression
@@ -613,15 +508,4 @@
 	template< typename OutputIterator >
 	void AlternativeFinder::Finder::inferParameters( Alternative &newAlt, OutputIterator out ) {
-		// SymTab::Indexer decls( indexer );
-		// addToIndexer( have, decls );
-		// AssertionSet newNeed;
-		// PRINT(
-		// 	std::cerr << "env is: " << std::endl;
-		// 	newAlt.env.print( std::cerr, 0 );
-		// 	std::cerr << std::endl;
-		// )
-
-		// inferRecursive( need.begin(), need.end(), newAlt, openVars, decls, newNeed, 0, indexer, out );
-
 		// Set need bindings for any unbound assertions
 		UniqueId crntResnSlot = 0;  // matching ID for this expression's assertions
@@ -1373,4 +1257,7 @@
 		/// Gets name from untyped member expression (member must be NameExpr)
 		const std::string& get_member_name( UntypedMemberExpr *memberExpr ) {
+			if ( dynamic_cast< ConstantExpr * >( memberExpr->get_member() ) ) {
+				SemanticError( memberExpr, "Indexed access to struct fields unsupported: " );
+			} // if
 			NameExpr * nameExpr = dynamic_cast< NameExpr * >( memberExpr->get_member() );
 			assert( nameExpr );
Index: src/ResolvExpr/ResolveTypeof.cc
===================================================================
--- src/ResolvExpr/ResolveTypeof.cc	(revision aeb8f70056004f741c9dcb505f8cb1cecb640ff1)
+++ src/ResolvExpr/ResolveTypeof.cc	(revision e99e43f290a67032231db42a3e1c62f8c7ba7ca7)
@@ -67,14 +67,43 @@
 		std::cerr << std::endl;
 #endif
-		if ( typeofType->expr ) {
+		// pass on null expression
+		if ( ! typeofType->expr ) return typeofType;
+
+		bool isBasetypeof = typeofType->is_basetypeof;
+		auto oldQuals = typeofType->get_qualifiers().val;
+
+		Type* newType;
+		if ( TypeExpr* tyExpr = dynamic_cast<TypeExpr*>(typeofType->expr) ) {
+			// typeof wrapping type
+			newType = tyExpr->type;
+			tyExpr->type = nullptr;
+			delete tyExpr;
+		} else {
+			// typeof wrapping expression
 			Expression * newExpr = resolveInVoidContext( typeofType->expr, indexer );
 			assert( newExpr->result && ! newExpr->result->isVoid() );
-			Type * newType = newExpr->result;
+			newType = newExpr->result;
 			newExpr->result = nullptr;
 			delete typeofType;
 			delete newExpr;
-			return newType;
-		} // if
-		return typeofType;
+		}
+
+		// clear qualifiers for base, combine with typeoftype quals in any case
+		if ( isBasetypeof ) {
+			// replace basetypeof(<enum>) by int
+			if ( dynamic_cast<EnumInstType*>(newType) ) {
+				Type* newerType = 
+					new BasicType{ newType->get_qualifiers(), BasicType::SignedInt, 
+					newType->attributes };
+				delete newType;
+				newType = newerType;
+			}
+			newType->get_qualifiers().val 
+				= ( newType->get_qualifiers().val & ~Type::Qualifiers::Mask ) | oldQuals;
+		} else {
+			newType->get_qualifiers().val |= oldQuals;
+		}
+		
+		return newType;
 	}
 } // namespace ResolvExpr
Index: src/SynTree/Expression.cc
===================================================================
--- src/SynTree/Expression.cc	(revision aeb8f70056004f741c9dcb505f8cb1cecb640ff1)
+++ src/SynTree/Expression.cc	(revision e99e43f290a67032231db42a3e1c62f8c7ba7ca7)
@@ -376,5 +376,5 @@
 	os << "Untyped Member Expression, with field: " << std::endl << indent+1;
 	member->print(os, indent+1 );
-	os << indent << "... from aggregate: " << std::endl << indent+1;
+	os << indent << "... from aggregate:" << std::endl << indent+1;
 	aggregate->print(os, indent+1);
 	Expression::print( os, indent );
@@ -405,8 +405,8 @@
 
 void MemberExpr::print( std::ostream &os, Indenter indent ) const {
-	os << "Member Expression, with field: " << std::endl;
+	os << "Member Expression, with field:" << std::endl;
 	os << indent+1;
 	member->print( os, indent+1 );
-	os << std::endl << indent << "... from aggregate: " << std::endl << indent+1;
+	os << std::endl << indent << "... from aggregate:" << std::endl << indent+1;
 	aggregate->print(os, indent + 1);
 	Expression::print( os, indent );
Index: src/SynTree/FunctionDecl.cc
===================================================================
--- src/SynTree/FunctionDecl.cc	(revision aeb8f70056004f741c9dcb505f8cb1cecb640ff1)
+++ src/SynTree/FunctionDecl.cc	(revision e99e43f290a67032231db42a3e1c62f8c7ba7ca7)
@@ -87,5 +87,5 @@
 
 	if ( statements ) {
-		os << indent << "... with body " << endl << indent+1;
+		os << indent << "... with body" << endl << indent+1;
 		statements->print( os, indent+1 );
 	} // if
Index: src/SynTree/FunctionType.cc
===================================================================
--- src/SynTree/FunctionType.cc	(revision aeb8f70056004f741c9dcb505f8cb1cecb640ff1)
+++ src/SynTree/FunctionType.cc	(revision e99e43f290a67032231db42a3e1c62f8c7ba7ca7)
@@ -66,7 +66,7 @@
 		os << indent+1 << "accepting unspecified arguments" << endl;
 	} // if
-	os << indent << "... returning ";
+	os << indent << "... returning";
 	if ( returnVals.empty() ) {
-		os << "nothing " << endl;
+		os << " nothing" << endl;
 	} else {
 		os << endl;
Index: src/SynTree/ObjectDecl.cc
===================================================================
--- src/SynTree/ObjectDecl.cc	(revision aeb8f70056004f741c9dcb505f8cb1cecb640ff1)
+++ src/SynTree/ObjectDecl.cc	(revision e99e43f290a67032231db42a3e1c62f8c7ba7ca7)
@@ -66,5 +66,5 @@
 
 	if ( ! attributes.empty() ) {
-		os << std::endl << indent << "... with attributes: " << std::endl;
+		os << std::endl << indent << "... with attributes:" << std::endl;
 		printAll( attributes, os, indent+1 );
 	}
Index: src/SynTree/ReferenceToType.cc
===================================================================
--- src/SynTree/ReferenceToType.cc	(revision aeb8f70056004f741c9dcb505f8cb1cecb640ff1)
+++ src/SynTree/ReferenceToType.cc	(revision e99e43f290a67032231db42a3e1c62f8c7ba7ca7)
@@ -93,5 +93,5 @@
 	else {
 		Type::print( os, indent );
-		os << "instance of " << typeString() << " " << name << " with body " << baseStruct->has_body() << " ";
+		os << "instance of " << typeString() << " " << name << " with body " << baseStruct->has_body();
 		if ( ! parameters.empty() ) {
 			os << endl << indent << "... with parameters" << endl;
@@ -136,5 +136,5 @@
 	else {
 		Type::print( os, indent );
-		os << "instance of " << typeString() << " " << name << " with body " << baseUnion->has_body() << " ";
+		os << "instance of " << typeString() << " " << name << " with body " << baseUnion->has_body();
 		if ( ! parameters.empty() ) {
 			os << endl << indent << "... with parameters" << endl;
@@ -160,5 +160,5 @@
 	else {
 		Type::print( os, indent );
-		os << "instance of " << typeString() << " " << name << " with body " << baseEnum->has_body() << " ";
+		os << "instance of " << typeString() << " " << name << " with body " << baseEnum->has_body();
 	} // if
 }
Index: src/SynTree/Type.h
===================================================================
--- src/SynTree/Type.h	(revision aeb8f70056004f741c9dcb505f8cb1cecb640ff1)
+++ src/SynTree/Type.h	(revision e99e43f290a67032231db42a3e1c62f8c7ba7ca7)
@@ -598,7 +598,10 @@
 class TypeofType : public Type {
   public:
-	Expression *expr;
-
-	TypeofType( const Type::Qualifiers & tq, Expression *expr, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
+	Expression *expr;    ///< expression to take the type of
+	bool is_basetypeof;  ///< true iff is basetypeof type
+
+	TypeofType( const Type::Qualifiers & tq, Expression *expr, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
+	TypeofType( const Type::Qualifiers & tq, Expression *expr, bool is_basetypeof, 
+		const std::list< Attribute * > & attributes = std::list< Attribute * >() );
 	TypeofType( const TypeofType& );
 	virtual ~TypeofType();
Index: src/SynTree/TypeofType.cc
===================================================================
--- src/SynTree/TypeofType.cc	(revision aeb8f70056004f741c9dcb505f8cb1cecb640ff1)
+++ src/SynTree/TypeofType.cc	(revision e99e43f290a67032231db42a3e1c62f8c7ba7ca7)
@@ -23,9 +23,14 @@
 class Attribute;
 
-TypeofType::TypeofType( const Type::Qualifiers &tq, Expression *expr, const std::list< Attribute * > & attributes ) : Type( tq, attributes ), expr( expr ) {
-}
+TypeofType::TypeofType( const Type::Qualifiers &tq, Expression *expr, 
+	const std::list< Attribute * > & attributes ) 
+: Type( tq, attributes ), expr( expr ), is_basetypeof(false) {}
 
-TypeofType::TypeofType( const TypeofType &other ) : Type( other ), expr( maybeClone( other.expr ) ) {
-}
+TypeofType::TypeofType( const Type::Qualifiers &tq, Expression *expr, bool is_basetypeof, 
+	const std::list< Attribute * > & attributes ) 
+: Type( tq, attributes ), expr( expr ), is_basetypeof( is_basetypeof ) {}
+
+TypeofType::TypeofType( const TypeofType &other )
+: Type( other ), expr( maybeClone( other.expr ) ), is_basetypeof( other.is_basetypeof ) {}
 
 TypeofType::~TypeofType() {
@@ -35,4 +40,5 @@
 void TypeofType::print( std::ostream &os, Indenter indent ) const {
 	Type::print( os, indent );
+	if ( is_basetypeof ) { os << "base-"; }
 	os << "type-of expression ";
 	if ( expr ) {
Index: src/cfa.make
===================================================================
--- src/cfa.make	(revision aeb8f70056004f741c9dcb505f8cb1cecb640ff1)
+++ src/cfa.make	(revision e99e43f290a67032231db42a3e1c62f8c7ba7ca7)
@@ -1,3 +1,9 @@
+
+
 CFACOMPILE = $(CFACC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFAFLAGS) $(CFAFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCFACOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CFACC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CFAFLAGS) $(CFAFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
 
 AM_V_CFA = $(am__v_CFA_@AM_V@)
@@ -10,2 +16,25 @@
 	$(CFACOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
 	$(am__mv) $$depbase.Tpo $$depbase.Po
+
+.cfa.lo:
+	$(AM_V_CFA)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+	$(LTCFACOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+	$(am__mv) $$depbase.Tpo $$depbase.Plo
+
+AM_V_JAVAC = $(am__v_JAVAC_@AM_V@)
+am__v_JAVAC_ = $(am__v_JAVAC_@AM_DEFAULT_V@)
+am__v_JAVAC_0 = @echo "  JAVAC   " $@;
+am__v_JAVAC_1 =
+
+AM_V_GOC = $(am__v_GOC_@AM_V@)
+am__v_GOC_ = $(am__v_GOC_@AM_DEFAULT_V@)
+am__v_GOC_0 = @echo "  GOC     " $@;
+am__v_GOC_1 =
+
+
+UPPCOMPILE = $(UPPCC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_UPPFLAGS) $(UPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_CFLAGS) $(CFLAGS)
+
+AM_V_UPP = $(am__v_UPP_@AM_V@)
+am__v_UPP_ = $(am__v_UPP_@AM_DEFAULT_V@)
+am__v_UPP_0 = @echo "  UPP     " $@;
+am__v_UPP_1 =
Index: src/config.h.in
===================================================================
--- src/config.h.in	(revision aeb8f70056004f741c9dcb505f8cb1cecb640ff1)
+++ src/config.h.in	(revision e99e43f290a67032231db42a3e1c62f8c7ba7ca7)
@@ -7,5 +7,5 @@
 #undef CFA_64_CPU
 
-/* Location of include files. */
+/* Backend compiler to use. */
 #undef CFA_BACKEND_CC
 
@@ -67,4 +67,7 @@
 #undef HAVE_ALLOCA_H
 
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
 /* Define to 1 if you have the <fenv.h> header file. */
 #undef HAVE_FENV_H
@@ -129,4 +132,7 @@
 /* Define to 1 if the system has the type `_Bool'. */
 #undef HAVE__BOOL
+
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
+#undef LT_OBJDIR
 
 /* Name of package */
Index: src/main.cc
===================================================================
--- src/main.cc	(revision aeb8f70056004f741c9dcb505f8cb1cecb640ff1)
+++ src/main.cc	(revision e99e43f290a67032231db42a3e1c62f8c7ba7ca7)
@@ -487,5 +487,5 @@
 			resolvep = true;
 			break;
-			case 'R':										// dump resolv-proto instance
+		  case 'R':										// dump resolv-proto instance
 			resolvprotop = true;
 			break;
