Index: .gitignore
===================================================================
--- .gitignore	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ .gitignore	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -24,4 +24,5 @@
 lib
 include
+share
 
 # src executables, for lib and bin
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ Makefile.am	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -21,2 +21,4 @@
 
 MAINTAINERCLEANFILES = lib/* bin/* src/examples/.deps/* src/tests/.deps/* src/tests/.out/*
+
+man1_MANS = doc/man/cfa.1
Index: Makefile.in
===================================================================
--- Makefile.in	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ Makefile.in	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -131,4 +131,35 @@
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+man1dir = $(mandir)/man1
+am__installdirs = "$(DESTDIR)$(man1dir)"
+NROFF = nroff
+MANS = $(man1_MANS)
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
   distclean-recursive maintainer-clean-recursive
@@ -167,6 +198,6 @@
 	$(top_srcdir)/automake/install-sh \
 	$(top_srcdir)/automake/missing INSTALL README automake/compile \
-	automake/config.guess automake/config.sub automake/depcomp \
-	automake/install-sh automake/missing automake/ylwrap
+	automake/config.guess automake/config.sub automake/install-sh \
+	automake/missing
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
@@ -335,4 +366,5 @@
 EXTRA_DIST = Docs			# non-source files
 MAINTAINERCLEANFILES = lib/* bin/* src/examples/.deps/* src/tests/.deps/* src/tests/.out/*
+man1_MANS = doc/man/cfa.1
 all: config.h
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
@@ -387,4 +419,45 @@
 distclean-hdr:
 	-rm -f config.h stamp-h1
+install-man1: $(man1_MANS)
+	@$(NORMAL_INSTALL)
+	@list1='$(man1_MANS)'; \
+	list2=''; \
+	test -n "$(man1dir)" \
+	  && test -n "`echo $$list1$$list2`" \
+	  || exit 0; \
+	echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+	$(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+	{ for i in $$list1; do echo "$$i"; done;  \
+	if test -n "$$list2"; then \
+	  for i in $$list2; do echo "$$i"; done \
+	    | sed -n '/\.1[a-z]*$$/p'; \
+	fi; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+	done; }
+
+uninstall-man1:
+	@$(NORMAL_UNINSTALL)
+	@list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
 
 # This directory's subdirectories are mostly independent; you can cd
@@ -684,7 +757,10 @@
 check-am: all-am
 check: check-recursive
-all-am: Makefile config.h
+all-am: Makefile $(MANS) config.h
 installdirs: installdirs-recursive
 installdirs-am:
+	for dir in "$(DESTDIR)$(man1dir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
 install: install-recursive
 install-exec: install-exec-recursive
@@ -739,5 +815,5 @@
 info-am:
 
-install-data-am:
+install-data-am: install-man
 
 install-dvi: install-dvi-recursive
@@ -755,5 +831,5 @@
 install-info-am:
 
-install-man:
+install-man: install-man1
 
 install-pdf: install-pdf-recursive
@@ -785,5 +861,7 @@
 ps-am:
 
-uninstall-am:
+uninstall-am: uninstall-man
+
+uninstall-man: uninstall-man1
 
 .MAKE: $(am__recursive_targets) all install-am install-strip
@@ -798,10 +876,10 @@
 	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 installdirs-am \
-	maintainer-clean maintainer-clean-generic mostlyclean \
-	mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
-	uninstall-am
+	install-info install-info-am install-man install-man1 \
+	install-pdf install-pdf-am install-ps install-ps-am \
+	install-strip installcheck installcheck-am installdirs \
+	installdirs-am maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
+	tags-am uninstall uninstall-am uninstall-man uninstall-man1
 
 .PRECIOUS: Makefile
Index: automake/compile
===================================================================
--- automake/compile	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ automake/compile	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -2,8 +2,7 @@
 # Wrapper for compilers which do not understand '-c -o'.
 
-scriptversion=2012-01-04.17; # UTC
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free
-# Software Foundation, Inc.
+scriptversion=2012-10-14.11; # UTC
+
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey@cygnus.com>.
 #
@@ -78,4 +77,51 @@
       ;;
   esac
+}
+
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+  func_file_conv "$1"
+  if test -z "$lib_path"; then
+    lib_path=$file
+  else
+    lib_path="$lib_path;$file"
+  fi
+  linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+  lib=$1
+  found=no
+  save_IFS=$IFS
+  IFS=';'
+  for dir in $lib_path $LIB
+  do
+    IFS=$save_IFS
+    if $shared && test -f "$dir/$lib.dll.lib"; then
+      found=yes
+      lib=$dir/$lib.dll.lib
+      break
+    fi
+    if test -f "$dir/$lib.lib"; then
+      found=yes
+      lib=$dir/$lib.lib
+      break
+    fi
+    if test -f "$dir/lib$lib.a"; then
+      found=yes
+      lib=$dir/lib$lib.a
+      break
+    fi
+  done
+  IFS=$save_IFS
+
+  if test "$found" != yes; then
+    lib=$lib.lib
+  fi
 }
 
@@ -110,4 +156,10 @@
 	  esac
 	  ;;
+	-I)
+	  eat=1
+	  func_file_conv "$2" mingw
+	  set x "$@" -I"$file"
+	  shift
+	  ;;
 	-I*)
 	  func_file_conv "${1#-I}" mingw
@@ -115,36 +167,21 @@
 	  shift
 	  ;;
+	-l)
+	  eat=1
+	  func_cl_dashl "$2"
+	  set x "$@" "$lib"
+	  shift
+	  ;;
 	-l*)
-	  lib=${1#-l}
-	  found=no
-	  save_IFS=$IFS
-	  IFS=';'
-	  for dir in $lib_path $LIB
-	  do
-	    IFS=$save_IFS
-	    if $shared && test -f "$dir/$lib.dll.lib"; then
-	      found=yes
-	      set x "$@" "$dir/$lib.dll.lib"
-	      break
-	    fi
-	    if test -f "$dir/$lib.lib"; then
-	      found=yes
-	      set x "$@" "$dir/$lib.lib"
-	      break
-	    fi
-	  done
-	  IFS=$save_IFS
-
-	  test "$found" != yes && set x "$@" "$lib.lib"
-	  shift
+	  func_cl_dashl "${1#-l}"
+	  set x "$@" "$lib"
+	  shift
+	  ;;
+	-L)
+	  eat=1
+	  func_cl_dashL "$2"
 	  ;;
 	-L*)
-	  func_file_conv "${1#-L}"
-	  if test -z "$lib_path"; then
-	    lib_path=$file
-	  else
-	    lib_path="$lib_path;$file"
-	  fi
-	  linker_opts="$linker_opts -LIBPATH:$file"
+	  func_cl_dashL "${1#-L}"
 	  ;;
 	-static)
Index: automake/config.guess
===================================================================
--- automake/config.guess	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ automake/config.guess	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -1,1 +1,1441 @@
-/usr/share/automake-1.15/config.guess
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright 1992-2015 Free Software Foundation, Inc.
+
+timestamp='2015-08-20'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+#
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+#
+# Please send patches to <config-patches@gnu.org>.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2015 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+	for c in cc gcc c89 c99 ; do
+	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	if test x"$CC_FOR_BUILD" = x ; then
+	  CC_FOR_BUILD=no_compiler_found ;
+	fi
+	;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case "${UNAME_SYSTEM}" in
+Linux|GNU|GNU/*)
+	# If the system lacks a compiler, then just pick glibc.
+	# We could probably try harder.
+	LIBC=gnu
+
+	eval $set_cc_for_build
+	cat <<-EOF > $dummy.c
+	#include <features.h>
+	#if defined(__UCLIBC__)
+	LIBC=uclibc
+	#elif defined(__dietlibc__)
+	LIBC=dietlibc
+	#else
+	LIBC=gnu
+	#endif
+	EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+	;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+	    /sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || \
+	    echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    sh5el) machine=sh5le-unknown ;;
+	    earmv*)
+		arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+		endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'`
+		machine=${arch}${endian}-unknown
+		;;
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		eval $set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep -q __ELF__
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+		os=netbsd
+		;;
+	esac
+	# Determine ABI tags.
+	case "${UNAME_MACHINE_ARCH}" in
+	    earm*)
+		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+		abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"`
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case "${UNAME_VERSION}" in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	echo "${machine}-${os}${release}${abi}"
+	exit ;;
+    *:Bitrig:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+	exit ;;
+    *:OpenBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+	exit ;;
+    *:ekkoBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+	exit ;;
+    *:SolidBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+	exit ;;
+    macppc:MirBSD:*:*)
+	echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    *:MirBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+	exit ;;
+    *:Sortix:*:*)
+	echo ${UNAME_MACHINE}-unknown-sortix
+	exit ;;
+    alpha:OSF1:*:*)
+	case $UNAME_RELEASE in
+	*4.0)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+		;;
+	*5.*)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case "$ALPHA_CPU_TYPE" in
+	    "EV4 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE="alphaev5" ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE="alphaev56" ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE="alphapca56" ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE="alphapca57" ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE="alphaev6" ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE="alphaev67" ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE="alphaev69" ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE="alphaev7" ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE="alphaev79" ;;
+	esac
+	# A Pn.n version is a patched version.
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	exitcode=$?
+	trap '' 0
+	exit $exitcode ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-unknown-sysv4
+	exit ;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
+	exit ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit ;;
+    *:z/VM:*:*)
+	echo s390-ibm-zvmoe
+	exit ;;
+    *:OS400:*:*)
+	echo powerpc-ibm-os400
+	exit ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit ;;
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
+	echo arm-unknown-riscos
+	exit ;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit ;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit ;;
+    DRS?6000:unix:4.0:6*)
+	echo sparc-icl-nx6
+	exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) echo sparc-icl-nx7; exit ;;
+	esac ;;
+    s390x:SunOS:*:*)
+	echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+	echo i386-pc-auroraux${UNAME_RELEASE}
+	exit ;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+	eval $set_cc_for_build
+	SUN_ARCH="i386"
+	# If there is a compiler, see if it is configured for 64-bit objects.
+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+	# This test works for both compilers.
+	if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		SUN_ARCH="x86_64"
+	    fi
+	fi
+	echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    sun4*:SunOS:*:*)
+	case "`/usr/bin/arch -k`" in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit ;;
+    aushp:SunOS:*:*)
+	echo sparc-auspex-sunos${UNAME_RELEASE}
+	exit ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+	exit ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+	echo m68k-milan-mint${UNAME_RELEASE}
+	exit ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+	echo m68k-hades-mint${UNAME_RELEASE}
+	exit ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+	echo m68k-unknown-mint${UNAME_RELEASE}
+	exit ;;
+    m68k:machten:*:*)
+	echo m68k-apple-machten${UNAME_RELEASE}
+	exit ;;
+    powerpc:machten:*:*)
+	echo powerpc-apple-machten${UNAME_RELEASE}
+	exit ;;
+    RISC*:Mach:*:*)
+	echo mips-dec-mach_bsd4.3
+	exit ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c &&
+	  dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`$dummy $dummyarg` &&
+	    { echo "$SYSTEM_NAME"; exit; }
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit ;;
+    Motorola:*:4.3:PL8-*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	echo powerpc-harris-powermax
+	exit ;;
+    Night_Hawk:Power_UNIX:*:*)
+	echo powerpc-harris-powerunix
+	exit ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit ;;
+    AViiON:dgux:*:*)
+	# DG/UX returns AViiON for all architectures
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	    else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
+	fi
+	exit ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+	exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	echo i386-ibm-aix
+	exit ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $set_cc_for_build
+		sed 's/^		//' << EOF >$dummy.c
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+		then
+			echo "$SYSTEM_NAME"
+		else
+			echo rs6000-ibm-aix3.2.5
+		fi
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit ;;
+    *:AIX:*:[4567])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if [ -x /usr/bin/lslpp ] ; then
+		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
+			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	exit ;;                             # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit ;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	case "${UNAME_MACHINE}" in
+	    9000/31? )            HP_ARCH=m68000 ;;
+	    9000/[34]?? )         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if [ -x /usr/bin/getconf ]; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+		    case "${sc_cpu_version}" in
+		      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+		      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+		      532)                      # CPU_PA_RISC2_0
+			case "${sc_kernel_bits}" in
+			  32) HP_ARCH="hppa2.0n" ;;
+			  64) HP_ARCH="hppa2.0w" ;;
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+			esac ;;
+		    esac
+		fi
+		if [ "${HP_ARCH}" = "" ]; then
+		    eval $set_cc_for_build
+		    sed 's/^		//' << EOF >$dummy.c
+
+		#define _HPUX_SOURCE
+		#include <stdlib.h>
+		#include <unistd.h>
+
+		int main ()
+		{
+		#if defined(_SC_KERNEL_BITS)
+		    long bits = sysconf(_SC_KERNEL_BITS);
+		#endif
+		    long cpu  = sysconf (_SC_CPU_VERSION);
+
+		    switch (cpu)
+			{
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+			case CPU_PA_RISC2_0:
+		#if defined(_SC_KERNEL_BITS)
+			    switch (bits)
+				{
+				case 64: puts ("hppa2.0w"); break;
+				case 32: puts ("hppa2.0n"); break;
+				default: puts ("hppa2.0"); break;
+				} break;
+		#else  /* !defined(_SC_KERNEL_BITS) */
+			    puts ("hppa2.0"); break;
+		#endif
+			default: puts ("hppa1.0"); break;
+			}
+		    exit (0);
+		}
+EOF
+		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if [ ${HP_ARCH} = "hppa2.0w" ]
+	then
+	    eval $set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep -q __LP64__
+	    then
+		HP_ARCH="hppa2.0w"
+	    else
+		HP_ARCH="hppa64"
+	    fi
+	fi
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit ;;
+    3050*:HI-UX:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+		{ echo "$SYSTEM_NAME"; exit; }
+	echo unknown-hitachi-hiuxwe2
+	exit ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit ;;
+    i*86:OSF1:*:*)
+	if [ -x /usr/sbin/sysversion ] ; then
+	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	else
+	    echo ${UNAME_MACHINE}-unknown-osf1
+	fi
+	exit ;;
+    parisc*:Lites*:*:*)
+	echo hppa1.1-hp-lites
+	exit ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	echo c1-convex-bsd
+	exit ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	echo c34-convex-bsd
+	exit ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	echo c38-convex-bsd
+	exit ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	echo c4-convex-bsd
+	exit ;;
+    CRAY*Y-MP:*:*:*)
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*[A-Z]90:*:*:*)
+	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*TS:*:*:*)
+	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*T3E:*:*:*)
+	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*SV1:*:*:*)
+	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    *:UNICOS/mp:*:*)
+	echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+	echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
+    5000:UNIX_System_V:4.*:*)
+	FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+	FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+	echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+	exit ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	exit ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit ;;
+    *:FreeBSD:*:*)
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	case ${UNAME_PROCESSOR} in
+	    amd64)
+		echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	    *)
+		echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+	esac
+	exit ;;
+    i*:CYGWIN*:*)
+	echo ${UNAME_MACHINE}-pc-cygwin
+	exit ;;
+    *:MINGW64*:*)
+	echo ${UNAME_MACHINE}-pc-mingw64
+	exit ;;
+    *:MINGW*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit ;;
+    *:MSYS*:*)
+	echo ${UNAME_MACHINE}-pc-msys
+	exit ;;
+    i*:windows32*:*)
+	# uname -m includes "-pc" on this system.
+	echo ${UNAME_MACHINE}-mingw32
+	exit ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit ;;
+    *:Interix*:*)
+	case ${UNAME_MACHINE} in
+	    x86)
+		echo i586-pc-interix${UNAME_RELEASE}
+		exit ;;
+	    authenticamd | genuineintel | EM64T)
+		echo x86_64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	    IA64)
+		echo ia64-unknown-interix${UNAME_RELEASE}
+		exit ;;
+	esac ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+	echo i${UNAME_MACHINE}-pc-mks
+	exit ;;
+    8664:Windows_NT:*)
+	echo x86_64-pc-mks
+	exit ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i586-pc-interix
+	exit ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
+	exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	echo x86_64-unknown-cygwin
+	exit ;;
+    p*:CYGWIN*:*)
+	echo powerpcle-unknown-cygwin
+	exit ;;
+    prep*:SunOS:5.*:*)
+	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit ;;
+    *:GNU:*:*)
+	# the GNU system
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit ;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
+	exit ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit ;;
+    aarch64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    aarch64_be:Linux:*:*)
+	UNAME_MACHINE=aarch64_be
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+	esac
+	objdump --private-headers /bin/sh | grep -q ld.so.1
+	if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    arc:Linux:*:* | arceb:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    arm*:Linux:*:*)
+	eval $set_cc_for_build
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_EABI__
+	then
+	    echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	else
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+		| grep -q __ARM_PCS_VFP
+	    then
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
+	    else
+		echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
+	    fi
+	fi
+	exit ;;
+    avr32*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    cris:Linux:*:*)
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+	exit ;;
+    crisv32:Linux:*:*)
+	echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+	exit ;;
+    e2k:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    frv:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    hexagon:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    i*86:Linux:*:*)
+	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+	exit ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    m32r*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    mips:Linux:*:* | mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef ${UNAME_MACHINE}
+	#undef ${UNAME_MACHINE}el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=${UNAME_MACHINE}el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=${UNAME_MACHINE}
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
+	test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+	;;
+    openrisc*:Linux:*:*)
+	echo or1k-unknown-linux-${LIBC}
+	exit ;;
+    or32:Linux:*:* | or1k*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    padre:Linux:*:*)
+	echo sparc-unknown-linux-${LIBC}
+	exit ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-${LIBC}
+	exit ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
+	  PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
+	  *)    echo hppa-unknown-linux-${LIBC} ;;
+	esac
+	exit ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-unknown-linux-${LIBC}
+	exit ;;
+    ppc:Linux:*:*)
+	echo powerpc-unknown-linux-${LIBC}
+	exit ;;
+    ppc64le:Linux:*:*)
+	echo powerpc64le-unknown-linux-${LIBC}
+	exit ;;
+    ppcle:Linux:*:*)
+	echo powerpcle-unknown-linux-${LIBC}
+	exit ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+	exit ;;
+    sh64*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    tile*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    vax:Linux:*:*)
+	echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+	exit ;;
+    x86_64:Linux:*:*)
+	echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+	exit ;;
+    xtensa*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
+	exit ;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	echo i386-sequent-sysv4
+	exit ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+	# Unixware is an offshoot of SVR4, but it has its own version
+	# number series starting with 2...
+	# I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+	# Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit ;;
+    i*86:syllable:*:*)
+	echo ${UNAME_MACHINE}-pc-syllable
+	exit ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit ;;
+    i*86:*:5:[678]*)
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit ;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit ;;
+    pc:*:*:*)
+	# Left here for compatibility:
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
+	# the processor, so we play safe by assuming i586.
+	# Note: whatever this is, it MUST be the same as what config.sub
+	# prints for the "djgpp" host, or else GDB configury will decide that
+	# this is a cross-build.
+	echo i586-pc-msdosdjgpp
+	exit ;;
+    Intel:Mach:3*:*)
+	echo i386-pc-mach3
+	exit ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit ;;
+    M680?0:D-NIX:5.3:*)
+	echo m68k-diab-dnix
+	exit ;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+	OS_REL='.3'
+	test -r /etc/.relid \
+	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	    && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+	    && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    rs6000:LynxOS:2.*:*)
+	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	exit ;;
+    SM[BE]S:UNIX_SV:*:*)
+	echo mips-dde-sysv${UNAME_RELEASE}
+	exit ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit ;;
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+			# says <Richard.M.Bartel@ccMail.Census.GOV>
+	echo i586-unisys-sysv4
+	exit ;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes@openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	echo hppa1.1-stratus-sysv4
+	exit ;;
+    *:*:*:FTX*)
+	# From seanf@swdc.stratus.com.
+	echo i860-stratus-sysv4
+	exit ;;
+    i*86:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	echo ${UNAME_MACHINE}-stratus-vos
+	exit ;;
+    *:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	echo hppa1.1-stratus-vos
+	exit ;;
+    mc68*:A/UX:*:*)
+	echo m68k-apple-aux${UNAME_RELEASE}
+	exit ;;
+    news*:NEWS-OS:6*:*)
+	echo mips-sony-newsos6
+	exit ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if [ -d /usr/nec ]; then
+		echo mips-nec-sysv${UNAME_RELEASE}
+	else
+		echo mips-unknown-sysv${UNAME_RELEASE}
+	fi
+	exit ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit ;;
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
+	echo i586-pc-haiku
+	exit ;;
+    x86_64:Haiku:*:*)
+	echo x86_64-unknown-haiku
+	exit ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-7:SUPER-UX:*:*)
+	echo sx7-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8:SUPER-UX:*:*)
+	echo sx8-nec-superux${UNAME_RELEASE}
+	exit ;;
+    SX-8R:SUPER-UX:*:*)
+	echo sx8r-nec-superux${UNAME_RELEASE}
+	exit ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit ;;
+    *:Darwin:*:*)
+	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+	eval $set_cc_for_build
+	if test "$UNAME_PROCESSOR" = unknown ; then
+	    UNAME_PROCESSOR=powerpc
+	fi
+	if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
+	    if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		    (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+		    grep IS_64BIT_ARCH >/dev/null
+		then
+		    case $UNAME_PROCESSOR in
+			i386) UNAME_PROCESSOR=x86_64 ;;
+			powerpc) UNAME_PROCESSOR=powerpc64 ;;
+		    esac
+		fi
+	    fi
+	elif test "$UNAME_PROCESSOR" = i386 ; then
+	    # Avoid executing cc on OS X 10.9, as it ships with a stub
+	    # that puts up a graphical alert prompting to install
+	    # developer tools.  Any system running Mac OS X 10.7 or
+	    # later (Darwin 11 and later) is required to have a 64-bit
+	    # processor. This is not true of the ARM version of Darwin
+	    # that Apple uses in portable devices.
+	    UNAME_PROCESSOR=x86_64
+	fi
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	exit ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	exit ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit ;;
+    NEO-?:NONSTOP_KERNEL:*:*)
+	echo neo-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSE-*:NONSTOP_KERNEL:*:*)
+	echo nse-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-unknown-plan9
+	exit ;;
+    *:TOPS-10:*:*)
+	echo pdp10-unknown-tops10
+	exit ;;
+    *:TENEX:*:*)
+	echo pdp10-unknown-tenex
+	exit ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit ;;
+    *:TOPS-20:*:*)
+	echo pdp10-unknown-tops20
+	exit ;;
+    *:ITS:*:*)
+	echo pdp10-unknown-its
+	exit ;;
+    SEI:*:*:SEIUX)
+	echo mips-sei-seiux${UNAME_RELEASE}
+	exit ;;
+    *:DragonFly:*:*)
+	echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+	exit ;;
+    *:*VMS:*:*)
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case "${UNAME_MACHINE}" in
+	    A*) echo alpha-dec-vms ; exit ;;
+	    I*) echo ia64-dec-vms ; exit ;;
+	    V*) echo vax-dec-vms ; exit ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	echo i386-pc-xenix
+	exit ;;
+    i*86:skyos:*:*)
+	echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+	exit ;;
+    i*86:rdos:*:*)
+	echo ${UNAME_MACHINE}-pc-rdos
+	exit ;;
+    i*86:AROS:*:*)
+	echo ${UNAME_MACHINE}-pc-aros
+	exit ;;
+    x86_64:VMkernel:*:*)
+	echo ${UNAME_MACHINE}-unknown-esx
+	exit ;;
+esac
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
Index: automake/config.sub
===================================================================
--- automake/config.sub	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ automake/config.sub	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -1,1 +1,1813 @@
-/usr/share/automake-1.15/config.sub
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright 1992-2015 Free Software Foundation, Inc.
+
+timestamp='2015-08-20'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches to <config-patches@gnu.org>.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2015 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
+  linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+  knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \
+  kopensolaris*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  android-linux)
+    os=-linux-android
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple | -axis | -knuth | -cray | -microblaze*)
+		os=
+		basic_machine=$1
+		;;
+	-bluegene*)
+		os=-cnk
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+	-chorusrdb)
+		os=-chorusrdb
+		basic_machine=$1
+		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco6)
+		os=-sco5v6
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco5)
+		os=-sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*178)
+		os=-lynxos178
+		;;
+	-lynx*5)
+		os=-lynxos5
+		;;
+	-lynx*)
+		os=-lynxos
+		;;
+	-ptx*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		;;
+	-psos*)
+		os=-psos
+		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+	# Recognize the basic CPU types without company name.
+	# Some are omitted here because they have special meanings below.
+	1750a | 580 \
+	| a29k \
+	| aarch64 | aarch64_be \
+	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+	| am33_2.0 \
+	| arc | arceb \
+	| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+	| avr | avr32 \
+	| ba \
+	| be32 | be64 \
+	| bfin \
+	| c4x | c8051 | clipper \
+	| d10v | d30v | dlx | dsp16xx \
+	| e2k | epiphany \
+	| fido | fr30 | frv | ft32 \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| hexagon \
+	| i370 | i860 | i960 | ia64 \
+	| ip2k | iq2000 \
+	| k1om \
+	| le32 | le64 \
+	| lm32 \
+	| m32c | m32r | m32rle | m68000 | m68k | m88k \
+	| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64octeon | mips64octeonel \
+	| mips64orion | mips64orionel \
+	| mips64r5900 | mips64r5900el \
+	| mips64vr | mips64vrel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mips64vr5900 | mips64vr5900el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa32r6 | mipsisa32r6el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64r2 | mipsisa64r2el \
+	| mipsisa64r6 | mipsisa64r6el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipsr5900 | mipsr5900el \
+	| mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| moxie \
+	| mt \
+	| msp430 \
+	| nds32 | nds32le | nds32be \
+	| nios | nios2 | nios2eb | nios2el \
+	| ns16k | ns32k \
+	| open8 | or1k | or1knd | or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle \
+	| pyramid \
+	| riscv32 | riscv64 \
+	| rl78 | rx \
+	| score \
+	| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+	| sh64 | sh64le \
+	| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+	| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+	| spu \
+	| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
+	| ubicom32 \
+	| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
+	| visium \
+	| we32k \
+	| x86 | xc16x | xstormy16 | xtensa \
+	| z8k | z80)
+		basic_machine=$basic_machine-unknown
+		;;
+	c54x)
+		basic_machine=tic54x-unknown
+		;;
+	c55x)
+		basic_machine=tic55x-unknown
+		;;
+	c6x)
+		basic_machine=tic6x-unknown
+		;;
+	leon|leon[3-9])
+		basic_machine=sparc-$basic_machine
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+	ms1)
+		basic_machine=mt-unknown
+		;;
+
+	strongarm | thumb | xscale)
+		basic_machine=arm-unknown
+		;;
+	xgate)
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	xscaleeb)
+		basic_machine=armeb-unknown
+		;;
+
+	xscaleel)
+		basic_machine=armel-unknown
+		;;
+
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	580-* \
+	| a29k-* \
+	| aarch64-* | aarch64_be-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+	| avr-* | avr32-* \
+	| ba-* \
+	| be32-* | be64-* \
+	| bfin-* | bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* \
+	| c8051-* | clipper-* | craynv-* | cydra-* \
+	| d10v-* | d30v-* | dlx-* \
+	| e2k-* | elxsi-* \
+	| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| hexagon-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| ip2k-* | iq2000-* \
+	| k1om-* \
+	| le32-* | le64-* \
+	| lm32-* \
+	| m32c-* | m32r-* | m32rle-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+	| microblaze-* | microblazeel-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64octeon-* | mips64octeonel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64r5900-* | mips64r5900el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* \
+	| mips64vr5000-* | mips64vr5000el-* \
+	| mips64vr5900-* | mips64vr5900el-* \
+	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa32r2-* | mipsisa32r2el-* \
+	| mipsisa32r6-* | mipsisa32r6el-* \
+	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64r2-* | mipsisa64r2el-* \
+	| mipsisa64r6-* | mipsisa64r6el-* \
+	| mipsisa64sb1-* | mipsisa64sb1el-* \
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipsr5900-* | mipsr5900el-* \
+	| mipstx39-* | mipstx39el-* \
+	| mmix-* \
+	| mt-* \
+	| msp430-* \
+	| nds32-* | nds32le-* | nds32be-* \
+	| nios-* | nios2-* | nios2eb-* | nios2el-* \
+	| none-* | np1-* | ns16k-* | ns32k-* \
+	| open8-* \
+	| or1k*-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
+	| pyramid-* \
+	| riscv32-* | riscv64-* \
+	| rl78-* | romp-* | rs6000-* | rx-* \
+	| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+	| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+	| sparclite-* \
+	| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
+	| tahoe-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tile*-* \
+	| tron-* \
+	| ubicom32-* \
+	| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
+	| vax-* \
+	| visium-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xc16x-* | xps100-* \
+	| xstormy16-* | xtensa*-* \
+	| ymp-* \
+	| z8k-* | z80-*)
+		;;
+	# Recognize the basic CPU types without company name, with glob match.
+	xtensa*)
+		basic_machine=$basic_machine-unknown
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	386bsd)
+		basic_machine=i386-unknown
+		os=-bsd
+		;;
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	a29khif)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	abacus)
+		basic_machine=abacus-unknown
+		;;
+	adobe68k)
+		basic_machine=m68010-adobe
+		os=-scout
+		;;
+	alliant | fx80)
+		basic_machine=fx80-alliant
+		;;
+	altos | altos3068)
+		basic_machine=m68k-altos
+		;;
+	am29k)
+		basic_machine=a29k-none
+		os=-bsd
+		;;
+	amd64)
+		basic_machine=x86_64-pc
+		;;
+	amd64-*)
+		basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	amdahl)
+		basic_machine=580-amdahl
+		os=-sysv
+		;;
+	amiga | amiga-*)
+		basic_machine=m68k-unknown
+		;;
+	amigaos | amigados)
+		basic_machine=m68k-unknown
+		os=-amigaos
+		;;
+	amigaunix | amix)
+		basic_machine=m68k-unknown
+		os=-sysv4
+		;;
+	apollo68)
+		basic_machine=m68k-apollo
+		os=-sysv
+		;;
+	apollo68bsd)
+		basic_machine=m68k-apollo
+		os=-bsd
+		;;
+	aros)
+		basic_machine=i386-pc
+		os=-aros
+		;;
+        asmjs)
+		basic_machine=asmjs-unknown
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	blackfin)
+		basic_machine=bfin-unknown
+		os=-linux
+		;;
+	blackfin-*)
+		basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	bluegene*)
+		basic_machine=powerpc-ibm
+		os=-cnk
+		;;
+	c54x-*)
+		basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c55x-*)
+		basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c6x-*)
+		basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	c90)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
+	cegcc)
+		basic_machine=arm-unknown
+		os=-cegcc
+		;;
+	convex-c1)
+		basic_machine=c1-convex
+		os=-bsd
+		;;
+	convex-c2)
+		basic_machine=c2-convex
+		os=-bsd
+		;;
+	convex-c32)
+		basic_machine=c32-convex
+		os=-bsd
+		;;
+	convex-c34)
+		basic_machine=c34-convex
+		os=-bsd
+		;;
+	convex-c38)
+		basic_machine=c38-convex
+		os=-bsd
+		;;
+	cray | j90)
+		basic_machine=j90-cray
+		os=-unicos
+		;;
+	craynv)
+		basic_machine=craynv-cray
+		os=-unicosmp
+		;;
+	cr16 | cr16-*)
+		basic_machine=cr16-unknown
+		os=-elf
+		;;
+	crds | unos)
+		basic_machine=m68k-crds
+		;;
+	crisv32 | crisv32-* | etraxfs*)
+		basic_machine=crisv32-axis
+		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
+	crx)
+		basic_machine=crx-unknown
+		os=-elf
+		;;
+	da30 | da30-*)
+		basic_machine=m68k-da30
+		;;
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+		basic_machine=mips-dec
+		;;
+	decsystem10* | dec10*)
+		basic_machine=pdp10-dec
+		os=-tops10
+		;;
+	decsystem20* | dec20*)
+		basic_machine=pdp10-dec
+		os=-tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		basic_machine=m68k-motorola
+		;;
+	delta88)
+		basic_machine=m88k-motorola
+		os=-sysv3
+		;;
+	dicos)
+		basic_machine=i686-pc
+		os=-dicos
+		;;
+	djgpp)
+		basic_machine=i586-pc
+		os=-msdosdjgpp
+		;;
+	dpx20 | dpx20-*)
+		basic_machine=rs6000-bull
+		os=-bosx
+		;;
+	dpx2* | dpx2*-bull)
+		basic_machine=m68k-bull
+		os=-sysv3
+		;;
+	ebmon29k)
+		basic_machine=a29k-amd
+		os=-ebmon
+		;;
+	elxsi)
+		basic_machine=elxsi-elxsi
+		os=-bsd
+		;;
+	encore | umax | mmax)
+		basic_machine=ns32k-encore
+		;;
+	es1800 | OSE68k | ose68k | ose | OSE)
+		basic_machine=m68k-ericsson
+		os=-ose
+		;;
+	fx2800)
+		basic_machine=i860-alliant
+		;;
+	genix)
+		basic_machine=ns32k-ns
+		;;
+	gmicro)
+		basic_machine=tron-gmicro
+		os=-sysv
+		;;
+	go32)
+		basic_machine=i386-pc
+		os=-go32
+		;;
+	h3050r* | hiux*)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	h8300hms)
+		basic_machine=h8300-hitachi
+		os=-hms
+		;;
+	h8300xray)
+		basic_machine=h8300-hitachi
+		os=-xray
+		;;
+	h8500hms)
+		basic_machine=h8500-hitachi
+		os=-hms
+		;;
+	harris)
+		basic_machine=m88k-harris
+		os=-sysv3
+		;;
+	hp300-*)
+		basic_machine=m68k-hp
+		;;
+	hp300bsd)
+		basic_machine=m68k-hp
+		os=-bsd
+		;;
+	hp300hpux)
+		basic_machine=m68k-hp
+		os=-hpux
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		basic_machine=m68000-hp
+		;;
+	hp9k3[2-9][0-9])
+		basic_machine=m68k-hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hppa-next)
+		os=-nextstep3
+		;;
+	hppaosf)
+		basic_machine=hppa1.1-hp
+		os=-osf
+		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
+	i370-ibm* | ibm*)
+		basic_machine=i370-ibm
+		;;
+	i*86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i*86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i*86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i*86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	i386mach)
+		basic_machine=i386-mach
+		os=-mach
+		;;
+	i386-vsta | vsta)
+		basic_machine=i386-unknown
+		os=-vsta
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	leon-*|leon[3-9]-*)
+		basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'`
+		;;
+	m68knommu)
+		basic_machine=m68k-unknown
+		os=-linux
+		;;
+	m68knommu-*)
+		basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+	microblaze*)
+		basic_machine=microblaze-xilinx
+		;;
+	mingw64)
+		basic_machine=x86_64-pc
+		os=-mingw64
+		;;
+	mingw32)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
+	mingw32ce)
+		basic_machine=arm-unknown
+		os=-mingw32ce
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	monitor)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
+	moxiebox)
+		basic_machine=moxie-unknown
+		os=-moxiebox
+		;;
+	msdos)
+		basic_machine=i386-pc
+		os=-msdos
+		;;
+	ms1-*)
+		basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+		;;
+	msys)
+		basic_machine=i686-pc
+		os=-msys
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	nacl)
+		basic_machine=le32-unknown
+		os=-nacl
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	neo-tandem)
+		basic_machine=neo-tandem
+		;;
+	nse-tandem)
+		basic_machine=nse-tandem
+		;;
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	openrisc | openrisc-*)
+		basic_machine=or32-unknown
+		;;
+	os400)
+		basic_machine=powerpc-ibm
+		os=-os400
+		;;
+	OSE68000 | ose68000)
+		basic_machine=m68000-ericsson
+		os=-ose
+		;;
+	os68k)
+		basic_machine=m68k-none
+		os=-os68k
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	parisc)
+		basic_machine=hppa-unknown
+		os=-linux
+		;;
+	parisc-*)
+		basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+		os=-linux
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+	pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pc98)
+		basic_machine=i386-pc
+		;;
+	pc98-*)
+		basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium | p5 | k5 | k6 | nexgen | viac3)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
+		basic_machine=i686-pc
+		;;
+	pentiumii | pentium2 | pentiumiii | pentium3)
+		basic_machine=i686-pc
+		;;
+	pentium4)
+		basic_machine=i786-pc
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium4-*)
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=power-ibm
+		;;
+	ppc | ppcbe)	basic_machine=powerpc-unknown
+		;;
+	ppc-* | ppcbe-*)
+		basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+		;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64)	basic_machine=powerpc64-unknown
+		;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+		;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rdos | rdos64)
+		basic_machine=x86_64-pc
+		os=-rdos
+		;;
+	rdos32)
+		basic_machine=i386-pc
+		os=-rdos
+		;;
+	rom68k)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	s390 | s390-*)
+		basic_machine=s390-ibm
+		;;
+	s390x | s390x-*)
+		basic_machine=s390x-ibm
+		;;
+	sa29200)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	sb1)
+		basic_machine=mipsisa64sb1-unknown
+		;;
+	sb1el)
+		basic_machine=mipsisa64sb1el-unknown
+		;;
+	sde)
+		basic_machine=mipsisa32-sde
+		os=-elf
+		;;
+	sei)
+		basic_machine=mips-sei
+		os=-seiux
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sh5el)
+		basic_machine=sh5le-unknown
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparclite-wrs | simso-wrs)
+		basic_machine=sparclite-wrs
+		os=-vxworks
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	st2000)
+		basic_machine=m68k-tandem
+		;;
+	stratus)
+		basic_machine=i860-stratus
+		os=-sysv4
+		;;
+	strongarm-* | thumb-*)
+		basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	sv1)
+		basic_machine=sv1-cray
+		os=-unicos
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	t3e)
+		basic_machine=alphaev5-cray
+		os=-unicos
+		;;
+	t90)
+		basic_machine=t90-cray
+		os=-unicos
+		;;
+	tile*)
+		basic_machine=$basic_machine-unknown
+		os=-linux-gnu
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	toad1)
+		basic_machine=pdp10-xkl
+		os=-tops20
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	tpf)
+		basic_machine=s390x-ibm
+		os=-tpf
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	v810 | necv810)
+		basic_machine=v810-nec
+		os=-none
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+		basic_machine=f301-fujitsu
+		;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	xbox)
+		basic_machine=i686-pc
+		os=-mingw32
+		;;
+	xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	xscale-* | xscalee[bl]-*)
+		basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
+		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	z80-*-coff)
+		basic_machine=z80-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	mmix)
+		basic_machine=mmix-knuth
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+		basic_machine=sh-unknown
+		;;
+	sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+		basic_machine=sparc-sun
+		;;
+	cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	mac | mpw | mac-mpw)
+		basic_machine=m68k-apple
+		;;
+	pmac | pmac-mpw)
+		basic_machine=powerpc-apple
+		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+	# First match some system type aliases
+	# that might get confused with valid system types.
+	# -solaris* is a basic system type, with this one exception.
+	-auroraux)
+		os=-auroraux
+		;;
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+	      | -sym* | -kopensolaris* | -plan9* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* | -aros* | -cloudabi* | -sortix* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+	      | -bitrig* | -openbsd* | -solidbsd* \
+	      | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+	      | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -chorusos* | -chorusrdb* | -cegcc* \
+	      | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+	      | -linux-newlib* | -linux-musl* | -linux-uclibc* \
+	      | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+	      | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i*86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto-qnx*)
+		;;
+	-nto*)
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+		;;
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+		;;
+	-mac*)
+		os=`echo $os | sed -e 's|mac|macos|'`
+		;;
+	-linux-dietlibc)
+		os=-linux-dietlibc
+		;;
+	-linux*)
+		os=`echo $os | sed -e 's|linux|linux-gnu|'`
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-opened*)
+		os=-openedition
+		;;
+	-os400*)
+		os=-os400
+		;;
+	-wince*)
+		os=-wince
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-utek*)
+		os=-bsd
+		;;
+	-dynix*)
+		os=-bsd
+		;;
+	-acis*)
+		os=-aos
+		;;
+	-atheos*)
+		os=-atheos
+		;;
+	-syllable*)
+		os=-syllable
+		;;
+	-386bsd)
+		os=-bsd
+		;;
+	-ctix* | -uts*)
+		os=-sysv
+		;;
+	-nova*)
+		os=-rtmk-nova
+		;;
+	-ns2 )
+		os=-nextstep2
+		;;
+	-nsk*)
+		os=-nsk
+		;;
+	# Preserve the version number of sinix5.
+	-sinix5.*)
+		os=`echo $os | sed -e 's|sinix|sysv|'`
+		;;
+	-sinix*)
+		os=-sysv4
+		;;
+	-tpf*)
+		os=-tpf
+		;;
+	-triton*)
+		os=-sysv3
+		;;
+	-oss*)
+		os=-sysv3
+		;;
+	-svr4)
+		os=-sysv4
+		;;
+	-svr3)
+		os=-sysv3
+		;;
+	-sysvr4)
+		os=-sysv4
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-ose*)
+		os=-ose
+		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+		os=-mint
+		;;
+	-aros*)
+		os=-aros
+		;;
+	-zvmoe)
+		os=-zvmoe
+		;;
+	-dicos*)
+		os=-dicos
+		;;
+	-nacl*)
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+	score-*)
+		os=-elf
+		;;
+	spu-*)
+		os=-elf
+		;;
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-rebel)
+		os=-linux
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+	c4x-* | tic4x-*)
+		os=-coff
+		;;
+	c8051-*)
+		os=-elf
+		;;
+	hexagon-*)
+		os=-elf
+		;;
+	tic54x-*)
+		os=-coff
+		;;
+	tic55x-*)
+		os=-coff
+		;;
+	tic6x-*)
+		os=-coff
+		;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=-tops20
+		;;
+	pdp11-*)
+		os=-none
+		;;
+	*-dec | vax-*)
+		os=-ultrix4.2
+		;;
+	m68*-apollo)
+		os=-domain
+		;;
+	i386-sun)
+		os=-sunos4.0.2
+		;;
+	m68000-sun)
+		os=-sunos3
+		;;
+	m68*-cisco)
+		os=-aout
+		;;
+	mep-*)
+		os=-elf
+		;;
+	mips*-cisco)
+		os=-elf
+		;;
+	mips*-*)
+		os=-elf
+		;;
+	or32-*)
+		os=-coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=-sysv3
+		;;
+	sparc-* | *-sun)
+		os=-sunos4.1.1
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-haiku)
+		os=-haiku
+		;;
+	*-ibm)
+		os=-aix
+		;;
+	*-knuth)
+		os=-mmixware
+		;;
+	*-wec)
+		os=-proelf
+		;;
+	*-winbond)
+		os=-proelf
+		;;
+	*-oki)
+		os=-proelf
+		;;
+	*-hp)
+		os=-hpux
+		;;
+	*-hitachi)
+		os=-hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=-sysv
+		;;
+	*-cbm)
+		os=-amigaos
+		;;
+	*-dg)
+		os=-dgux
+		;;
+	*-dolphin)
+		os=-sysv3
+		;;
+	m68k-ccur)
+		os=-rtu
+		;;
+	m88k-omron*)
+		os=-luna
+		;;
+	*-next )
+		os=-nextstep
+		;;
+	*-sequent)
+		os=-ptx
+		;;
+	*-crds)
+		os=-unos
+		;;
+	*-ns)
+		os=-genix
+		;;
+	i370-*)
+		os=-mvs
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+	*-gould)
+		os=-sysv
+		;;
+	*-highlevel)
+		os=-bsd
+		;;
+	*-encore)
+		os=-bsd
+		;;
+	*-sgi)
+		os=-irix
+		;;
+	*-siemens)
+		os=-sysv4
+		;;
+	*-masscomp)
+		os=-rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=-uxpv
+		;;
+	*-rom68k)
+		os=-coff
+		;;
+	*-*bug)
+		os=-coff
+		;;
+	*-apple)
+		os=-macos
+		;;
+	*-atari*)
+		os=-mint
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $os in
+			-riscix*)
+				vendor=acorn
+				;;
+			-sunos*)
+				vendor=sun
+				;;
+			-cnk*|-aix*)
+				vendor=ibm
+				;;
+			-beos*)
+				vendor=be
+				;;
+			-hpux*)
+				vendor=hp
+				;;
+			-mpeix*)
+				vendor=hp
+				;;
+			-hiux*)
+				vendor=hitachi
+				;;
+			-unos*)
+				vendor=crds
+				;;
+			-dgux*)
+				vendor=dg
+				;;
+			-luna*)
+				vendor=omron
+				;;
+			-genix*)
+				vendor=ns
+				;;
+			-mvs* | -opened*)
+				vendor=ibm
+				;;
+			-os400*)
+				vendor=ibm
+				;;
+			-ptx*)
+				vendor=sequent
+				;;
+			-tpf*)
+				vendor=ibm
+				;;
+			-vxsim* | -vxworks* | -windiss*)
+				vendor=wrs
+				;;
+			-aux*)
+				vendor=apple
+				;;
+			-hms*)
+				vendor=hitachi
+				;;
+			-mpw* | -macos*)
+				vendor=apple
+				;;
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+				vendor=atari
+				;;
+			-vos*)
+				vendor=stratus
+				;;
+		esac
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
Index: automake/depcomp
===================================================================
--- automake/depcomp	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ automake/depcomp	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -2,8 +2,7 @@
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2011-12-04.11; # UTC
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
-# 2011 Free Software Foundation, Inc.
+scriptversion=2013-05-30.07; # UTC
+
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -29,7 +28,7 @@
 case $1 in
   '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
-     exit 1;
-     ;;
+    echo "$0: No command.  Try '$0 --help' for more information." 1>&2
+    exit 1;
+    ;;
   -h | --h*)
     cat <<\EOF
@@ -41,6 +40,6 @@
 Environment variables:
   depmode     Dependency tracking mode.
-  source      Source file read by `PROGRAMS ARGS'.
-  object      Object file output by `PROGRAMS ARGS'.
+  source      Source file read by 'PROGRAMS ARGS'.
+  object      Object file output by 'PROGRAMS ARGS'.
   DEPDIR      directory where to store dependencies.
   depfile     Dependency file to output.
@@ -58,4 +57,64 @@
 esac
 
+# Get the directory component of the given path, and save it in the
+# global variables '$dir'.  Note that this directory component will
+# be either empty or ending with a '/' character.  This is deliberate.
+set_dir_from ()
+{
+  case $1 in
+    */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
+      *) dir=;;
+  esac
+}
+
+# Get the suffix-stripped basename of the given path, and save it the
+# global variable '$base'.
+set_base_from ()
+{
+  base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
+}
+
+# If no dependency file was actually created by the compiler invocation,
+# we still have to create a dummy depfile, to avoid errors with the
+# Makefile "include basename.Plo" scheme.
+make_dummy_depfile ()
+{
+  echo "#dummy" > "$depfile"
+}
+
+# Factor out some common post-processing of the generated depfile.
+# Requires the auxiliary global variable '$tmpdepfile' to be set.
+aix_post_process_depfile ()
+{
+  # If the compiler actually managed to produce a dependency file,
+  # post-process it.
+  if test -f "$tmpdepfile"; then
+    # Each line is of the form 'foo.o: dependency.h'.
+    # Do two passes, one to just change these to
+    #   $object: dependency.h
+    # and one to simply output
+    #   dependency.h:
+    # which is needed to avoid the deleted-header problem.
+    { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
+      sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
+    } > "$depfile"
+    rm -f "$tmpdepfile"
+  else
+    make_dummy_depfile
+  fi
+}
+
+# A tabulation character.
+tab='	'
+# A newline character.
+nl='
+'
+# Character ranges might be problematic outside the C locale.
+# These definitions help.
+upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
+lower=abcdefghijklmnopqrstuvwxyz
+digits=0123456789
+alpha=${upper}${lower}
+
 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
   echo "depcomp: Variables source, object and depmode must be set" 1>&2
@@ -69,4 +128,7 @@
 
 rm -f "$tmpdepfile"
+
+# Avoid interferences from the environment.
+gccflag= dashmflag=
 
 # Some modes work just like other modes, but use different flags.  We
@@ -81,24 +143,30 @@
 
 if test "$depmode" = dashXmstdout; then
-   # This is just like dashmstdout with a different argument.
-   dashmflag=-xM
-   depmode=dashmstdout
+  # This is just like dashmstdout with a different argument.
+  dashmflag=-xM
+  depmode=dashmstdout
 fi
 
 cygpath_u="cygpath -u -f -"
 if test "$depmode" = msvcmsys; then
-   # This is just like msvisualcpp but w/o cygpath translation.
-   # Just convert the backslash-escaped backslashes to single forward
-   # slashes to satisfy depend.m4
-   cygpath_u='sed s,\\\\,/,g'
-   depmode=msvisualcpp
+  # This is just like msvisualcpp but w/o cygpath translation.
+  # Just convert the backslash-escaped backslashes to single forward
+  # slashes to satisfy depend.m4
+  cygpath_u='sed s,\\\\,/,g'
+  depmode=msvisualcpp
 fi
 
 if test "$depmode" = msvc7msys; then
-   # This is just like msvc7 but w/o cygpath translation.
-   # Just convert the backslash-escaped backslashes to single forward
-   # slashes to satisfy depend.m4
-   cygpath_u='sed s,\\\\,/,g'
-   depmode=msvc7
+  # This is just like msvc7 but w/o cygpath translation.
+  # Just convert the backslash-escaped backslashes to single forward
+  # slashes to satisfy depend.m4
+  cygpath_u='sed s,\\\\,/,g'
+  depmode=msvc7
+fi
+
+if test "$depmode" = xlc; then
+  # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
+  gccflag=-qmakedep=gcc,-MF
+  depmode=gcc
 fi
 
@@ -123,6 +191,5 @@
   "$@"
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
@@ -132,4 +199,7 @@
 
 gcc)
+## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
+## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
+## (see the conditional assignment to $gccflag above).
 ## There are various ways to get dependency output from gcc.  Here's
 ## why we pick this rather obscure method:
@@ -138,5 +208,6 @@
 ##   (We might end up doing this anyway to support other compilers.)
 ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-##   -MM, not -M (despite what the docs say).
+##   -MM, not -M (despite what the docs say).  Also, it might not be
+##   supported by the other compilers which use the 'gcc' depmode.
 ## - Using -M directly means running the compiler twice (even worse
 ##   than renaming).
@@ -146,6 +217,5 @@
   "$@" -Wp,"$gccflag$tmpdepfile"
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
@@ -153,9 +223,9 @@
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
-  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## The second -e expression handles DOS-style file names with drive letters.
+  # The second -e expression handles DOS-style file names with drive
+  # letters.
   sed -e 's/^[^:]*: / /' \
       -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
-## This next piece of magic avoids the `deleted header file' problem.
+## This next piece of magic avoids the "deleted header file" problem.
 ## The problem is that when a header file which appears in a .P file
 ## is deleted, the dependency causes make to die (because there is
@@ -163,7 +233,5 @@
 ## dummy dependencies for each header file.  Too bad gcc doesn't do
 ## this for us directly.
-  tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'.  On the theory
+## Some versions of gcc put a space before the ':'.  On the theory
 ## that the space means something, we add a space to the output as
 ## well.  hp depmode also adds that space, but also prefixes the VPATH
@@ -171,6 +239,7 @@
 ## Some versions of the HPUX 10.20 sed can't process this invocation
 ## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
-      | sed -e 's/$/ :/' >> "$depfile"
+  tr ' ' "$nl" < "$tmpdepfile" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+    | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
@@ -190,6 +259,5 @@
   fi
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
@@ -199,30 +267,29 @@
   if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
     echo "$object : \\" > "$depfile"
-
     # Clip off the initial element (the dependent).  Don't try to be
     # clever and replace this with sed code, as IRIX sed won't handle
     # lines with more than a fixed number of characters (4096 in
     # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
-    # the IRIX cc adds comments like `#:fec' to the end of the
+    # the IRIX cc adds comments like '#:fec' to the end of the
     # dependency line.
-    tr ' ' '
-' < "$tmpdepfile" \
-    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
-    tr '
-' ' ' >> "$depfile"
+    tr ' ' "$nl" < "$tmpdepfile" \
+      | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
+      | tr "$nl" ' ' >> "$depfile"
     echo >> "$depfile"
-
     # The second pass generates a dummy entry for each header file.
-    tr ' ' '
-' < "$tmpdepfile" \
-   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
-   >> "$depfile"
+    tr ' ' "$nl" < "$tmpdepfile" \
+      | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+      >> "$depfile"
   else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
+    make_dummy_depfile
   fi
   rm -f "$tmpdepfile"
+  ;;
+
+xlc)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
   ;;
 
@@ -230,10 +297,9 @@
   # The C for AIX Compiler uses -M and outputs the dependencies
   # in a .u file.  In older versions, this file always lives in the
-  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # current directory.  Also, the AIX compiler puts '$object:' at the
   # start of each line; $object doesn't have directory information.
   # Version 6 uses the directory in both cases.
-  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-  test "x$dir" = "x$object" && dir=
-  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  set_dir_from "$object"
+  set_base_from "$object"
   if test "$libtool" = yes; then
     tmpdepfile1=$dir$base.u
@@ -248,7 +314,5 @@
   fi
   stat=$?
-
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
     exit $stat
@@ -259,42 +323,98 @@
     test -f "$tmpdepfile" && break
   done
-  if test -f "$tmpdepfile"; then
-    # Each line is of the form `foo.o: dependent.h'.
-    # Do two passes, one to just change these to
-    # `$object: dependent.h' and one to simply `dependent.h:'.
-    sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-    # That's a tab and a space in the [].
-    sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
-  else
-    # The sourcefile does not contain any dependencies, so just
-    # store a dummy comment line, to avoid errors with the Makefile
-    # "include basename.Plo" scheme.
-    echo "#dummy" > "$depfile"
-  fi
+  aix_post_process_depfile
+  ;;
+
+tcc)
+  # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
+  # FIXME: That version still under development at the moment of writing.
+  #        Make that this statement remains true also for stable, released
+  #        versions.
+  # It will wrap lines (doesn't matter whether long or short) with a
+  # trailing '\', as in:
+  #
+  #   foo.o : \
+  #    foo.c \
+  #    foo.h \
+  #
+  # It will put a trailing '\' even on the last line, and will use leading
+  # spaces rather than leading tabs (at least since its commit 0394caf7
+  # "Emit spaces for -MD").
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
+  # We have to change lines of the first kind to '$object: \'.
+  sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
+  # And for each line of the second kind, we have to emit a 'dep.h:'
+  # dummy dependency, to avoid the deleted-header problem.
+  sed -n -e 's|^  *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
-icc)
-  # Intel's C compiler understands `-MD -MF file'.  However on
-  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
-  # ICC 7.0 will fill foo.d with something like
-  #    foo.o: sub/foo.c
-  #    foo.o: sub/foo.h
-  # which is wrong.  We want:
-  #    sub/foo.o: sub/foo.c
-  #    sub/foo.o: sub/foo.h
-  #    sub/foo.c:
-  #    sub/foo.h:
-  # ICC 7.1 will output
+## The order of this option in the case statement is important, since the
+## shell code in configure will try each of these formats in the order
+## listed in this file.  A plain '-MD' option would be understood by many
+## compilers, so we must ensure this comes after the gcc and icc options.
+pgcc)
+  # Portland's C compiler understands '-MD'.
+  # Will always output deps to 'file.d' where file is the root name of the
+  # source file under compilation, even if file resides in a subdirectory.
+  # The object file name does not affect the name of the '.d' file.
+  # pgcc 10.2 will output
   #    foo.o: sub/foo.c sub/foo.h
-  # and will wrap long lines using \ :
+  # and will wrap long lines using '\' :
   #    foo.o: sub/foo.c ... \
   #     sub/foo.h ... \
   #     ...
-
-  "$@" -MD -MF "$tmpdepfile"
-  stat=$?
-  if test $stat -eq 0; then :
-  else
+  set_dir_from "$object"
+  # Use the source, not the object, to determine the base name, since
+  # that's sadly what pgcc will do too.
+  set_base_from "$source"
+  tmpdepfile=$base.d
+
+  # For projects that build the same source file twice into different object
+  # files, the pgcc approach of using the *source* file root name can cause
+  # problems in parallel builds.  Use a locking strategy to avoid stomping on
+  # the same $tmpdepfile.
+  lockdir=$base.d-lock
+  trap "
+    echo '$0: caught signal, cleaning up...' >&2
+    rmdir '$lockdir'
+    exit 1
+  " 1 2 13 15
+  numtries=100
+  i=$numtries
+  while test $i -gt 0; do
+    # mkdir is a portable test-and-set.
+    if mkdir "$lockdir" 2>/dev/null; then
+      # This process acquired the lock.
+      "$@" -MD
+      stat=$?
+      # Release the lock.
+      rmdir "$lockdir"
+      break
+    else
+      # If the lock is being held by a different process, wait
+      # until the winning process is done or we timeout.
+      while test -d "$lockdir" && test $i -gt 0; do
+        sleep 1
+        i=`expr $i - 1`
+      done
+    fi
+    i=`expr $i - 1`
+  done
+  trap - 1 2 13 15
+  if test $i -le 0; then
+    echo "$0: failed to acquire lock after $numtries attempts" >&2
+    echo "$0: check lockdir '$lockdir'" >&2
+    exit 1
+  fi
+
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
@@ -308,6 +428,6 @@
   # Some versions of the HPUX 10.20 sed can't process this invocation
   # correctly.  Breaking it into two sed invocations is a workaround.
-  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
-    sed -e 's/$/ :/' >> "$depfile"
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
+    | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
@@ -320,7 +440,6 @@
   # happens to be.
   # Much of this is similar to the tru64 case; see comments there.
-  dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-  test "x$dir" = "x$object" && dir=
-  base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+  set_dir_from  "$object"
+  set_base_from "$object"
   if test "$libtool" = yes; then
     tmpdepfile1=$dir$base.d
@@ -333,6 +452,5 @@
   fi
   stat=$?
-  if test $stat -eq 0; then :
-  else
+  if test $stat -ne 0; then
      rm -f "$tmpdepfile1" "$tmpdepfile2"
      exit $stat
@@ -344,14 +462,14 @@
   done
   if test -f "$tmpdepfile"; then
-    sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
-    # Add `dependent.h:' lines.
+    sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add 'dependent.h:' lines.
     sed -ne '2,${
-	       s/^ *//
-	       s/ \\*$//
-	       s/$/:/
-	       p
-	     }' "$tmpdepfile" >> "$depfile"
+               s/^ *//
+               s/ \\*$//
+               s/$/:/
+               p
+             }' "$tmpdepfile" >> "$depfile"
   else
-    echo "#dummy" > "$depfile"
+    make_dummy_depfile
   fi
   rm -f "$tmpdepfile" "$tmpdepfile2"
@@ -359,60 +477,44 @@
 
 tru64)
-   # The Tru64 compiler uses -MD to generate dependencies as a side
-   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
-   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
-   # dependencies in `foo.d' instead, so we check for that too.
-   # Subdirectories are respected.
-   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
-   test "x$dir" = "x$object" && dir=
-   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-
-   if test "$libtool" = yes; then
-      # With Tru64 cc, shared objects can also be used to make a
-      # static library.  This mechanism is used in libtool 1.4 series to
-      # handle both shared and static libraries in a single compilation.
-      # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
-      #
-      # With libtool 1.5 this exception was removed, and libtool now
-      # generates 2 separate objects for the 2 libraries.  These two
-      # compilations output dependencies in $dir.libs/$base.o.d and
-      # in $dir$base.o.d.  We have to check for both files, because
-      # one of the two compilations can be disabled.  We should prefer
-      # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
-      # automatically cleaned when .libs/ is deleted, while ignoring
-      # the former would cause a distcleancheck panic.
-      tmpdepfile1=$dir.libs/$base.lo.d   # libtool 1.4
-      tmpdepfile2=$dir$base.o.d          # libtool 1.5
-      tmpdepfile3=$dir.libs/$base.o.d    # libtool 1.5
-      tmpdepfile4=$dir.libs/$base.d      # Compaq CCC V6.2-504
-      "$@" -Wc,-MD
-   else
-      tmpdepfile1=$dir$base.o.d
-      tmpdepfile2=$dir$base.d
-      tmpdepfile3=$dir$base.d
-      tmpdepfile4=$dir$base.d
-      "$@" -MD
-   fi
-
-   stat=$?
-   if test $stat -eq 0; then :
-   else
-      rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
-      exit $stat
-   fi
-
-   for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
-   do
-     test -f "$tmpdepfile" && break
-   done
-   if test -f "$tmpdepfile"; then
-      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-      # That's a tab and a space in the [].
-      sed -e 's,^.*\.[a-z]*:[	 ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
-   else
-      echo "#dummy" > "$depfile"
-   fi
-   rm -f "$tmpdepfile"
-   ;;
+  # The Tru64 compiler uses -MD to generate dependencies as a side
+  # effect.  'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
+  # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+  # dependencies in 'foo.d' instead, so we check for that too.
+  # Subdirectories are respected.
+  set_dir_from  "$object"
+  set_base_from "$object"
+
+  if test "$libtool" = yes; then
+    # Libtool generates 2 separate objects for the 2 libraries.  These
+    # two compilations output dependencies in $dir.libs/$base.o.d and
+    # in $dir$base.o.d.  We have to check for both files, because
+    # one of the two compilations can be disabled.  We should prefer
+    # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+    # automatically cleaned when .libs/ is deleted, while ignoring
+    # the former would cause a distcleancheck panic.
+    tmpdepfile1=$dir$base.o.d          # libtool 1.5
+    tmpdepfile2=$dir.libs/$base.o.d    # Likewise.
+    tmpdepfile3=$dir.libs/$base.d      # Compaq CCC V6.2-504
+    "$@" -Wc,-MD
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    tmpdepfile3=$dir$base.d
+    "$@" -MD
+  fi
+
+  stat=$?
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+    exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  # Same post-processing that is required for AIX mode.
+  aix_post_process_depfile
+  ;;
 
 msvc7)
@@ -425,6 +527,5 @@
   stat=$?
   grep -v '^Note: including file: ' "$tmpdepfile"
-  if test "$stat" = 0; then :
-  else
+  if test $stat -ne 0; then
     rm -f "$tmpdepfile"
     exit $stat
@@ -444,12 +545,13 @@
 }' | $cygpath_u | sort -u | sed -n '
 s/ /\\ /g
-s/\(.*\)/	\1 \\/p
+s/\(.*\)/'"$tab"'\1 \\/p
 s/.\(.*\) \\/\1:/
 H
 $ {
-  s/.*/	/
+  s/.*/'"$tab"'/
   G
   p
 }' >> "$depfile"
+  echo >> "$depfile" # make sure the fragment doesn't end with a backslash
   rm -f "$tmpdepfile"
   ;;
@@ -479,5 +581,5 @@
   fi
 
-  # Remove `-o $object'.
+  # Remove '-o $object'.
   IFS=" "
   for arg
@@ -499,16 +601,16 @@
 
   test -z "$dashmflag" && dashmflag=-M
-  # Require at least two characters before searching for `:'
+  # Require at least two characters before searching for ':'
   # in the target name.  This is to cope with DOS-style filenames:
-  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
   "$@" $dashmflag |
-    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+    sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
   rm -f "$depfile"
   cat < "$tmpdepfile" > "$depfile"
-  tr ' ' '
-' < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this sed invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  tr ' ' "$nl" < "$tmpdepfile" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+    | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
@@ -563,9 +665,10 @@
   # No need to regex-escape $object, excess matching of '.' is harmless.
   sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
-  sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly.  Breaking it into two sed invocations is a workaround.
-    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process the last invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed '1,2d' "$tmpdepfile" \
+    | tr ' ' "$nl" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+    | sed -e 's/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile" "$tmpdepfile".bak
   ;;
@@ -584,5 +687,5 @@
   fi
 
-  # Remove `-o $object'.
+  # Remove '-o $object'.
   IFS=" "
   for arg
@@ -603,8 +706,8 @@
   done
 
-  "$@" -E |
-    sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-       -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
-    sed '$ s: \\$::' > "$tmpdepfile"
+  "$@" -E \
+    | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+             -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+    | sed '$ s: \\$::' > "$tmpdepfile"
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
@@ -638,13 +741,13 @@
       ;;
     "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
-	set fnord "$@"
-	shift
-	shift
-	;;
+        set fnord "$@"
+        shift
+        shift
+        ;;
     *)
-	set fnord "$@" "$arg"
-	shift
-	shift
-	;;
+        set fnord "$@" "$arg"
+        shift
+        shift
+        ;;
     esac
   done
@@ -653,6 +756,6 @@
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
-  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
-  echo "	" >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+  echo "$tab" >> "$depfile"
   sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
   rm -f "$tmpdepfile"
Index: automake/install-sh
===================================================================
--- automake/install-sh	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ automake/install-sh	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -2,5 +2,5 @@
 # install - install a program, script, or datafile
 
-scriptversion=2011-01-19.21; # UTC
+scriptversion=2014-09-12.12; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
@@ -36,5 +36,5 @@
 #
 # Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
+# 'make' implicit rules from creating a file called install from it
 # when there is no Makefile.
 #
@@ -42,17 +42,13 @@
 # from scratch.
 
+tab='	'
 nl='
 '
-IFS=" ""	$nl"
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
+IFS=" $tab$nl"
+
+# Set DOITPROG to "echo" to test this script.
+
 doit=${DOITPROG-}
-if test -z "$doit"; then
-  doit_exec=exec
-else
-  doit_exec=$doit
-fi
+doit_exec=${doit:-exec}
 
 # Put in absolute file names if you don't have them in your path;
@@ -69,15 +65,4 @@
 stripprog=${STRIPPROG-strip}
 
-posix_glob='?'
-initialize_posix_glob='
-  test "$posix_glob" != "?" || {
-    if (set -f) 2>/dev/null; then
-      posix_glob=
-    else
-      posix_glob=:
-    fi
-  }
-'
-
 posix_mkdir=
 
@@ -98,5 +83,5 @@
 
 copy_on_change=false
-no_target_directory=
+is_target_a_directory=possibly
 
 usage="\
@@ -138,38 +123,39 @@
 
     -g) chgrpcmd="$chgrpprog $2"
-	shift;;
+        shift;;
 
     --help) echo "$usage"; exit $?;;
 
     -m) mode=$2
-	case $mode in
-	  *' '* | *'	'* | *'
-'*	  | *'*'* | *'?'* | *'['*)
-	    echo "$0: invalid mode: $mode" >&2
-	    exit 1;;
-	esac
-	shift;;
+        case $mode in
+          *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
+            echo "$0: invalid mode: $mode" >&2
+            exit 1;;
+        esac
+        shift;;
 
     -o) chowncmd="$chownprog $2"
-	shift;;
+        shift;;
 
     -s) stripcmd=$stripprog;;
 
-    -t) dst_arg=$2
-	# Protect names problematic for `test' and other utilities.
-	case $dst_arg in
-	  -* | [=\(\)!]) dst_arg=./$dst_arg;;
-	esac
-	shift;;
-
-    -T) no_target_directory=true;;
+    -t)
+        is_target_a_directory=always
+        dst_arg=$2
+        # Protect names problematic for 'test' and other utilities.
+        case $dst_arg in
+          -* | [=\(\)!]) dst_arg=./$dst_arg;;
+        esac
+        shift;;
+
+    -T) is_target_a_directory=never;;
 
     --version) echo "$0 $scriptversion"; exit $?;;
 
-    --)	shift
-	break;;
-
-    -*)	echo "$0: invalid option: $1" >&2
-	exit 1;;
+    --) shift
+        break;;
+
+    -*) echo "$0: invalid option: $1" >&2
+        exit 1;;
 
     *)  break;;
@@ -177,4 +163,14 @@
   shift
 done
+
+# We allow the use of options -d and -T together, by making -d
+# take the precedence; this is for compatibility with GNU install.
+
+if test -n "$dir_arg"; then
+  if test -n "$dst_arg"; then
+    echo "$0: target directory not allowed when installing a directory." >&2
+    exit 1
+  fi
+fi
 
 if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
@@ -191,5 +187,5 @@
     shift # arg
     dst_arg=$arg
-    # Protect names problematic for `test' and other utilities.
+    # Protect names problematic for 'test' and other utilities.
     case $dst_arg in
       -* | [=\(\)!]) dst_arg=./$dst_arg;;
@@ -203,7 +199,16 @@
     exit 1
   fi
-  # It's OK to call `install-sh -d' without argument.
+  # It's OK to call 'install-sh -d' without argument.
   # This can happen when creating conditional directories.
   exit 0
+fi
+
+if test -z "$dir_arg"; then
+  if test $# -gt 1 || test "$is_target_a_directory" = always; then
+    if test ! -d "$dst_arg"; then
+      echo "$0: $dst_arg: Is not a directory." >&2
+      exit 1
+    fi
+  fi
 fi
 
@@ -224,14 +229,14 @@
     *[0-7])
       if test -z "$stripcmd"; then
-	u_plus_rw=
+        u_plus_rw=
       else
-	u_plus_rw='% 200'
+        u_plus_rw='% 200'
       fi
       cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
     *)
       if test -z "$stripcmd"; then
-	u_plus_rw=
+        u_plus_rw=
       else
-	u_plus_rw=,u+rw
+        u_plus_rw=,u+rw
       fi
       cp_umask=$mode$u_plus_rw;;
@@ -241,5 +246,5 @@
 for src
 do
-  # Protect names problematic for `test' and other utilities.
+  # Protect names problematic for 'test' and other utilities.
   case $src in
     -* | [=\(\)!]) src=./$src;;
@@ -270,7 +275,7 @@
     # if double slashes aren't ignored.
     if test -d "$dst"; then
-      if test -n "$no_target_directory"; then
-	echo "$0: $dst_arg: Is a directory" >&2
-	exit 1
+      if test "$is_target_a_directory" = never; then
+        echo "$0: $dst_arg: Is a directory" >&2
+        exit 1
       fi
       dstdir=$dst
@@ -278,31 +283,5 @@
       dstdir_status=0
     else
-      # Prefer dirname, but fall back on a substitute if dirname fails.
-      dstdir=`
-	(dirname "$dst") 2>/dev/null ||
-	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	     X"$dst" : 'X\(//\)[^/]' \| \
-	     X"$dst" : 'X\(//\)$' \| \
-	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
-	echo X"$dst" |
-	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-		   s//\1/
-		   q
-		 }
-		 /^X\(\/\/\)[^/].*/{
-		   s//\1/
-		   q
-		 }
-		 /^X\(\/\/\)$/{
-		   s//\1/
-		   q
-		 }
-		 /^X\(\/\).*/{
-		   s//\1/
-		   q
-		 }
-		 s/.*/./; q'
-      `
-
+      dstdir=`dirname "$dst"`
       test -d "$dstdir"
       dstdir_status=$?
@@ -315,72 +294,79 @@
     case $posix_mkdir in
       '')
-	# Create intermediate dirs using mode 755 as modified by the umask.
-	# This is like FreeBSD 'install' as of 1997-10-28.
-	umask=`umask`
-	case $stripcmd.$umask in
-	  # Optimize common cases.
-	  *[2367][2367]) mkdir_umask=$umask;;
-	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
-	  *[0-7])
-	    mkdir_umask=`expr $umask + 22 \
-	      - $umask % 100 % 40 + $umask % 20 \
-	      - $umask % 10 % 4 + $umask % 2
-	    `;;
-	  *) mkdir_umask=$umask,go-w;;
-	esac
-
-	# With -d, create the new directory with the user-specified mode.
-	# Otherwise, rely on $mkdir_umask.
-	if test -n "$dir_arg"; then
-	  mkdir_mode=-m$mode
-	else
-	  mkdir_mode=
-	fi
-
-	posix_mkdir=false
-	case $umask in
-	  *[123567][0-7][0-7])
-	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
-	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
-	    ;;
-	  *)
-	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
-	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
-	    if (umask $mkdir_umask &&
-		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
-	    then
-	      if test -z "$dir_arg" || {
-		   # Check for POSIX incompatibilities with -m.
-		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
-		   # other-writeable bit of parent directory when it shouldn't.
-		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
-		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
-		   case $ls_ld_tmpdir in
-		     d????-?r-*) different_mode=700;;
-		     d????-?--*) different_mode=755;;
-		     *) false;;
-		   esac &&
-		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
-		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
-		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
-		   }
-		 }
-	      then posix_mkdir=:
-	      fi
-	      rmdir "$tmpdir/d" "$tmpdir"
-	    else
-	      # Remove any dirs left behind by ancient mkdir implementations.
-	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
-	    fi
-	    trap '' 0;;
-	esac;;
+        # Create intermediate dirs using mode 755 as modified by the umask.
+        # This is like FreeBSD 'install' as of 1997-10-28.
+        umask=`umask`
+        case $stripcmd.$umask in
+          # Optimize common cases.
+          *[2367][2367]) mkdir_umask=$umask;;
+          .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+          *[0-7])
+            mkdir_umask=`expr $umask + 22 \
+              - $umask % 100 % 40 + $umask % 20 \
+              - $umask % 10 % 4 + $umask % 2
+            `;;
+          *) mkdir_umask=$umask,go-w;;
+        esac
+
+        # With -d, create the new directory with the user-specified mode.
+        # Otherwise, rely on $mkdir_umask.
+        if test -n "$dir_arg"; then
+          mkdir_mode=-m$mode
+        else
+          mkdir_mode=
+        fi
+
+        posix_mkdir=false
+        case $umask in
+          *[123567][0-7][0-7])
+            # POSIX mkdir -p sets u+wx bits regardless of umask, which
+            # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+            ;;
+          *)
+            # $RANDOM is not portable (e.g. dash);  use it when possible to
+            # lower collision chance
+            tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+            trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+            # As "mkdir -p" follows symlinks and we work in /tmp possibly;  so
+            # create the $tmpdir first (and fail if unsuccessful) to make sure
+            # that nobody tries to guess the $tmpdir name.
+            if (umask $mkdir_umask &&
+                $mkdirprog $mkdir_mode "$tmpdir" &&
+                exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
+            then
+              if test -z "$dir_arg" || {
+                   # Check for POSIX incompatibilities with -m.
+                   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+                   # other-writable bit of parent directory when it shouldn't.
+                   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+                   test_tmpdir="$tmpdir/a"
+                   ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
+                   case $ls_ld_tmpdir in
+                     d????-?r-*) different_mode=700;;
+                     d????-?--*) different_mode=755;;
+                     *) false;;
+                   esac &&
+                   $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+                     ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
+                     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+                   }
+                 }
+              then posix_mkdir=:
+              fi
+              rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
+            else
+              # Remove any dirs left behind by ancient mkdir implementations.
+              rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
+            fi
+            trap '' 0;;
+        esac;;
     esac
 
     if
       $posix_mkdir && (
-	umask $mkdir_umask &&
-	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+        umask $mkdir_umask &&
+        $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
       )
     then :
@@ -392,17 +378,15 @@
 
       case $dstdir in
-	/*) prefix='/';;
-	[-=\(\)!]*) prefix='./';;
-	*)  prefix='';;
+        /*) prefix='/';;
+        [-=\(\)!]*) prefix='./';;
+        *)  prefix='';;
       esac
-
-      eval "$initialize_posix_glob"
 
       oIFS=$IFS
       IFS=/
-      $posix_glob set -f
+      set -f
       set fnord $dstdir
       shift
-      $posix_glob set +f
+      set +f
       IFS=$oIFS
 
@@ -411,32 +395,32 @@
       for d
       do
-	test X"$d" = X && continue
-
-	prefix=$prefix$d
-	if test -d "$prefix"; then
-	  prefixes=
-	else
-	  if $posix_mkdir; then
-	    (umask=$mkdir_umask &&
-	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
-	    # Don't fail if two instances are running concurrently.
-	    test -d "$prefix" || exit 1
-	  else
-	    case $prefix in
-	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
-	      *) qprefix=$prefix;;
-	    esac
-	    prefixes="$prefixes '$qprefix'"
-	  fi
-	fi
-	prefix=$prefix/
+        test X"$d" = X && continue
+
+        prefix=$prefix$d
+        if test -d "$prefix"; then
+          prefixes=
+        else
+          if $posix_mkdir; then
+            (umask=$mkdir_umask &&
+             $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+            # Don't fail if two instances are running concurrently.
+            test -d "$prefix" || exit 1
+          else
+            case $prefix in
+              *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+              *) qprefix=$prefix;;
+            esac
+            prefixes="$prefixes '$qprefix'"
+          fi
+        fi
+        prefix=$prefix/
       done
 
       if test -n "$prefixes"; then
-	# Don't fail if two instances are running concurrently.
-	(umask $mkdir_umask &&
-	 eval "\$doit_exec \$mkdirprog $prefixes") ||
-	  test -d "$dstdir" || exit 1
-	obsolete_mkdir_used=true
+        # Don't fail if two instances are running concurrently.
+        (umask $mkdir_umask &&
+         eval "\$doit_exec \$mkdirprog $prefixes") ||
+          test -d "$dstdir" || exit 1
+        obsolete_mkdir_used=true
       fi
     fi
@@ -473,13 +457,10 @@
     # If -C, don't bother to copy if it wouldn't change the file.
     if $copy_on_change &&
-       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
-       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
-
-       eval "$initialize_posix_glob" &&
-       $posix_glob set -f &&
+       old=`LC_ALL=C ls -dlL "$dst"     2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"  2>/dev/null` &&
+       set -f &&
        set X $old && old=:$2:$4:$5:$6 &&
        set X $new && new=:$2:$4:$5:$6 &&
-       $posix_glob set +f &&
-
+       set +f &&
        test "$old" = "$new" &&
        $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
@@ -494,22 +475,22 @@
       # support -f.
       {
-	# Now remove or move aside any old file at destination location.
-	# We try this two ways since rm can't unlink itself on some
-	# systems and the destination file might be busy for other
-	# reasons.  In this case, the final cleanup might fail but the new
-	# file should still install successfully.
-	{
-	  test ! -f "$dst" ||
-	  $doit $rmcmd -f "$dst" 2>/dev/null ||
-	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
-	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
-	  } ||
-	  { echo "$0: cannot unlink or rename $dst" >&2
-	    (exit 1); exit 1
-	  }
-	} &&
-
-	# Now rename the file to the real destination.
-	$doit $mvcmd "$dsttmp" "$dst"
+        # Now remove or move aside any old file at destination location.
+        # We try this two ways since rm can't unlink itself on some
+        # systems and the destination file might be busy for other
+        # reasons.  In this case, the final cleanup might fail but the new
+        # file should still install successfully.
+        {
+          test ! -f "$dst" ||
+          $doit $rmcmd -f "$dst" 2>/dev/null ||
+          { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+            { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+          } ||
+          { echo "$0: cannot unlink or rename $dst" >&2
+            (exit 1); exit 1
+          }
+        } &&
+
+        # Now rename the file to the real destination.
+        $doit $mvcmd "$dsttmp" "$dst"
       }
     fi || exit 1
Index: automake/test-driver
===================================================================
--- automake/test-driver	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ automake/test-driver	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -1,1 +1,148 @@
-/usr/share/automake-1.15/test-driver
+#! /bin/sh
+# test-driver - basic testsuite driver script.
+
+scriptversion=2013-07-13.22; # UTC
+
+# Copyright (C) 2011-2014 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+# Make unconditional expansion of undefined variables an error.  This
+# helps a lot in preventing typo-related bugs.
+set -u
+
+usage_error ()
+{
+  echo "$0: $*" >&2
+  print_usage >&2
+  exit 2
+}
+
+print_usage ()
+{
+  cat <<END
+Usage:
+  test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
+              [--expect-failure={yes|no}] [--color-tests={yes|no}]
+              [--enable-hard-errors={yes|no}] [--]
+              TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
+The '--test-name', '--log-file' and '--trs-file' options are mandatory.
+END
+}
+
+test_name= # Used for reporting.
+log_file=  # Where to save the output of the test script.
+trs_file=  # Where to save the metadata of the test run.
+expect_failure=no
+color_tests=no
+enable_hard_errors=yes
+while test $# -gt 0; do
+  case $1 in
+  --help) print_usage; exit $?;;
+  --version) echo "test-driver $scriptversion"; exit $?;;
+  --test-name) test_name=$2; shift;;
+  --log-file) log_file=$2; shift;;
+  --trs-file) trs_file=$2; shift;;
+  --color-tests) color_tests=$2; shift;;
+  --expect-failure) expect_failure=$2; shift;;
+  --enable-hard-errors) enable_hard_errors=$2; shift;;
+  --) shift; break;;
+  -*) usage_error "invalid option: '$1'";;
+   *) break;;
+  esac
+  shift
+done
+
+missing_opts=
+test x"$test_name" = x && missing_opts="$missing_opts --test-name"
+test x"$log_file"  = x && missing_opts="$missing_opts --log-file"
+test x"$trs_file"  = x && missing_opts="$missing_opts --trs-file"
+if test x"$missing_opts" != x; then
+  usage_error "the following mandatory options are missing:$missing_opts"
+fi
+
+if test $# -eq 0; then
+  usage_error "missing argument"
+fi
+
+if test $color_tests = yes; then
+  # Keep this in sync with 'lib/am/check.am:$(am__tty_colors)'.
+  red='[0;31m' # Red.
+  grn='[0;32m' # Green.
+  lgn='[1;32m' # Light green.
+  blu='[1;34m' # Blue.
+  mgn='[0;35m' # Magenta.
+  std='[m'     # No color.
+else
+  red= grn= lgn= blu= mgn= std=
+fi
+
+do_exit='rm -f $log_file $trs_file; (exit $st); exit $st'
+trap "st=129; $do_exit" 1
+trap "st=130; $do_exit" 2
+trap "st=141; $do_exit" 13
+trap "st=143; $do_exit" 15
+
+# Test script is run here.
+"$@" >$log_file 2>&1
+estatus=$?
+
+if test $enable_hard_errors = no && test $estatus -eq 99; then
+  tweaked_estatus=1
+else
+  tweaked_estatus=$estatus
+fi
+
+case $tweaked_estatus:$expect_failure in
+  0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
+  0:*)   col=$grn res=PASS  recheck=no  gcopy=no;;
+  77:*)  col=$blu res=SKIP  recheck=no  gcopy=yes;;
+  99:*)  col=$mgn res=ERROR recheck=yes gcopy=yes;;
+  *:yes) col=$lgn res=XFAIL recheck=no  gcopy=yes;;
+  *:*)   col=$red res=FAIL  recheck=yes gcopy=yes;;
+esac
+
+# Report the test outcome and exit status in the logs, so that one can
+# know whether the test passed or failed simply by looking at the '.log'
+# file, without the need of also peaking into the corresponding '.trs'
+# file (automake bug#11814).
+echo "$res $test_name (exit status: $estatus)" >>$log_file
+
+# Report outcome to console.
+echo "${col}${res}${std}: $test_name"
+
+# Register the test result, and other relevant metadata.
+echo ":test-result: $res" > $trs_file
+echo ":global-test-result: $res" >> $trs_file
+echo ":recheck: $recheck" >> $trs_file
+echo ":copy-in-global-log: $gcopy" >> $trs_file
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
Index: automake/ylwrap
===================================================================
--- automake/ylwrap	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ automake/ylwrap	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -2,8 +2,7 @@
 # ylwrap - wrapper for lex/yacc invocations.
 
-scriptversion=2011-08-25.18; # UTC
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005,
-# 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
+scriptversion=2013-01-12.17; # UTC
+
+# Copyright (C) 1996-2014 Free Software Foundation, Inc.
 #
 # Written by Tom Tromey <tromey@cygnus.com>.
@@ -31,7 +30,39 @@
 # <automake-patches@gnu.org>.
 
+get_dirname ()
+{
+  case $1 in
+    */*|*\\*) printf '%s\n' "$1" | sed -e 's|\([\\/]\)[^\\/]*$|\1|';;
+    # Otherwise,  we want the empty string (not ".").
+  esac
+}
+
+# guard FILE
+# ----------
+# The CPP macro used to guard inclusion of FILE.
+guard ()
+{
+  printf '%s\n' "$1"                                                    \
+    | sed                                                               \
+        -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'   \
+        -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'                        \
+        -e 's/__*/_/g'
+}
+
+# quote_for_sed [STRING]
+# ----------------------
+# Return STRING (or stdin) quoted to be used as a sed pattern.
+quote_for_sed ()
+{
+  case $# in
+    0) cat;;
+    1) printf '%s\n' "$1";;
+  esac \
+    | sed -e 's|[][\\.*]|\\&|g'
+}
+
 case "$1" in
   '')
-    echo "$0: No files given.  Try \`$0 --help' for more information." 1>&2
+    echo "$0: No files given.  Try '$0 --help' for more information." 1>&2
     exit 1
     ;;
@@ -66,7 +97,9 @@
 
 # The input.
-input="$1"
+input=$1
 shift
-case "$input" in
+# We'll later need for a correct munging of "#line" directives.
+input_sub_rx=`get_dirname "$input" | quote_for_sed`
+case $input in
   [\\/]* | ?:[\\/]*)
     # Absolute path; do nothing.
@@ -74,29 +107,59 @@
   *)
     # Relative path.  Make it absolute.
-    input="`pwd`/$input"
-    ;;
-esac
-
-pairlist=
-while test "$#" -ne 0; do
-  if test "$1" = "--"; then
+    input=`pwd`/$input
+    ;;
+esac
+input_rx=`get_dirname "$input" | quote_for_sed`
+
+# Since DOS filename conventions don't allow two dots,
+# the DOS version of Bison writes out y_tab.c instead of y.tab.c
+# and y_tab.h instead of y.tab.h. Test to see if this is the case.
+y_tab_nodot=false
+if test -f y_tab.c || test -f y_tab.h; then
+  y_tab_nodot=true
+fi
+
+# The parser itself, the first file, is the destination of the .y.c
+# rule in the Makefile.
+parser=$1
+
+# A sed program to s/FROM/TO/g for all the FROM/TO so that, for
+# instance, we rename #include "y.tab.h" into #include "parse.h"
+# during the conversion from y.tab.c to parse.c.
+sed_fix_filenames=
+
+# Also rename header guards, as Bison 2.7 for instance uses its header
+# guard in its implementation file.
+sed_fix_header_guards=
+
+while test $# -ne 0; do
+  if test x"$1" = x"--"; then
     shift
     break
   fi
-  pairlist="$pairlist $1"
+  from=$1
+  # Handle y_tab.c and y_tab.h output by DOS
+  if $y_tab_nodot; then
+    case $from in
+      "y.tab.c") from=y_tab.c;;
+      "y.tab.h") from=y_tab.h;;
+    esac
+  fi
   shift
+  to=$1
+  shift
+  sed_fix_filenames="${sed_fix_filenames}s|"`quote_for_sed "$from"`"|$to|g;"
+  sed_fix_header_guards="${sed_fix_header_guards}s|"`guard "$from"`"|"`guard "$to"`"|g;"
 done
 
 # The program to run.
-prog="$1"
+prog=$1
 shift
 # Make any relative path in $prog absolute.
-case "$prog" in
+case $prog in
   [\\/]* | ?:[\\/]*) ;;
-  *[\\/]*) prog="`pwd`/$prog" ;;
-esac
-
-# FIXME: add hostname here for parallel makes that run commands on
-# other machines.  But that might take us over the 14-char limit.
+  *[\\/]*) prog=`pwd`/$prog ;;
+esac
+
 dirname=ylwrap$$
 do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit $ret'
@@ -116,96 +179,54 @@
 
 if test $ret -eq 0; then
-  set X $pairlist
-  shift
-  first=yes
-  # Since DOS filename conventions don't allow two dots,
-  # the DOS version of Bison writes out y_tab.c instead of y.tab.c
-  # and y_tab.h instead of y.tab.h. Test to see if this is the case.
-  y_tab_nodot="no"
-  if test -f y_tab.c || test -f y_tab.h; then
-    y_tab_nodot="yes"
-  fi
-
-  # The directory holding the input.
-  input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
-  # Quote $INPUT_DIR so we can use it in a regexp.
-  # FIXME: really we should care about more than `.' and `\'.
-  input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'`
-
-  while test "$#" -ne 0; do
-    from="$1"
-    # Handle y_tab.c and y_tab.h output by DOS
-    if test $y_tab_nodot = "yes"; then
-      if test $from = "y.tab.c"; then
-        from="y_tab.c"
-      else
-        if test $from = "y.tab.h"; then
-          from="y_tab.h"
-        fi
-      fi
-    fi
+  for from in *
+  do
+    to=`printf '%s\n' "$from" | sed "$sed_fix_filenames"`
     if test -f "$from"; then
       # If $2 is an absolute path name, then just use that,
-      # otherwise prepend `../'.
-      case "$2" in
-        [\\/]* | ?:[\\/]*) target="$2";;
-        *) target="../$2";;
+      # otherwise prepend '../'.
+      case $to in
+        [\\/]* | ?:[\\/]*) target=$to;;
+        *) target=../$to;;
       esac
 
-      # We do not want to overwrite a header file if it hasn't
-      # changed.  This avoid useless recompilations.  However the
-      # parser itself (the first file) should always be updated,
-      # because it is the destination of the .y.c rule in the
-      # Makefile.  Divert the output of all other files to a temporary
-      # file so we can compare them to existing versions.
-      if test $first = no; then
-        realtarget="$target"
-        target="tmp-`echo $target | sed s/.*[\\/]//g`"
+      # Do not overwrite unchanged header files to avoid useless
+      # recompilations.  Always update the parser itself: it is the
+      # destination of the .y.c rule in the Makefile.  Divert the
+      # output of all other files to a temporary file so we can
+      # compare them to existing versions.
+      if test $from != $parser; then
+        realtarget=$target
+        target=tmp-`printf '%s\n' "$target" | sed 's|.*[\\/]||g'`
       fi
-      # Edit out `#line' or `#' directives.
-      #
-      # We don't want the resulting debug information to point at
-      # an absolute srcdir; it is better for it to just mention the
-      # .y file with no path.
-      #
-      # We want to use the real output file name, not yy.lex.c for
-      # instance.
-      #
-      # We want the include guards to be adjusted too.
-      FROM=`echo "$from" | sed \
-            -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
-            -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
-      TARGET=`echo "$2" | sed \
-            -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\
-            -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'`
-
-      sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$2," \
-          -e "s,$FROM,$TARGET," "$from" >"$target" || ret=$?
-
-      # Check whether header files must be updated.
-      if test $first = no; then
+
+      # Munge "#line" or "#" directives.  Don't let the resulting
+      # debug information point at an absolute srcdir.  Use the real
+      # output file name, not yy.lex.c for instance.  Adjust the
+      # include guards too.
+      sed -e "/^#/!b"                           \
+          -e "s|$input_rx|$input_sub_rx|"       \
+          -e "$sed_fix_filenames"               \
+          -e "$sed_fix_header_guards"           \
+        "$from" >"$target" || ret=$?
+
+      # Check whether files must be updated.
+      if test "$from" != "$parser"; then
         if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then
-          echo "$2" is unchanged
+          echo "$to is unchanged"
           rm -f "$target"
         else
-          echo updating "$2"
+          echo "updating $to"
           mv -f "$target" "$realtarget"
         fi
       fi
     else
-      # A missing file is only an error for the first file.  This
-      # is a blatant hack to let us support using "yacc -d".  If -d
-      # is not specified, we don't want an error when the header
-      # file is "missing".
-      if test $first = yes; then
+      # A missing file is only an error for the parser.  This is a
+      # blatant hack to let us support using "yacc -d".  If -d is not
+      # specified, don't fail when the header file is "missing".
+      if test "$from" = "$parser"; then
         ret=1
       fi
     fi
-    shift
-    shift
-    first=no
   done
-else
-  ret=$?
 fi
 
Index: doc/LaTeXmacros/common.tex
===================================================================
--- doc/LaTeXmacros/common.tex	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ doc/LaTeXmacros/common.tex	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -11,6 +11,6 @@
 %% Created On       : Sat Apr  9 10:06:17 2016
 %% Last Modified By : Peter A. Buhr
-%% Last Modified On : Mon Jul 17 10:21:17 2017
-%% Update Count     : 348
+%% Last Modified On : Mon Jul 24 21:02:14 2017
+%% Update Count     : 352
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
@@ -234,5 +234,5 @@
 basicstyle=\linespread{0.9}\sf,							% reduce line spacing and use sanserif font
 stringstyle=\tt,										% use typewriter font
-tabsize=6,												% N space tabbing
+tabsize=5,												% N space tabbing
 xleftmargin=\parindentlnth,								% indent code to paragraph indentation
 extendedchars=true,										% allow ASCII characters in the range 128-255
Index: doc/LaTeXmacros/lstlang.sty
===================================================================
--- doc/LaTeXmacros/lstlang.sty	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ doc/LaTeXmacros/lstlang.sty	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -8,6 +8,6 @@
 %% Created On       : Sat May 13 16:34:42 2017
 %% Last Modified By : Peter A. Buhr
-%% Last Modified On : Wed Jul 12 22:42:09 2017
-%% Update Count     : 12
+%% Last Modified On : Mon Jul 24 20:40:37 2017
+%% Update Count     : 13
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
@@ -112,5 +112,5 @@
 		finally, forall, ftype, _Generic, _Imaginary, inline, __label__, lvalue, _Noreturn, one_t, 
 		otype, restrict, _Static_assert, throw, throwResume, trait, try, ttype, typeof, __typeof, 
-		__typeof__, with, zero_t},
+		__typeof__, virtual, with, zero_t},
 	morekeywords=[2]{
 		_Atomic, coroutine, is_coroutine, is_monitor, is_thread, monitor, mutex, nomutex, 
Index: c/generic_types/generic_types.bib
===================================================================
--- doc/generic_types/generic_types.bib	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ 	(revision )
@@ -1,94 +1,0 @@
-@mastersthesis{Bilson03,
-    keywords	= {Cforall, parametric polymorphism, overloading},
-    contributer	= {pabuhr@plg},
-    author	= {Richard C. Bilson},
-    title	= {Implementing Overloading and Polymorphism in Cforall},
-    school	= {School of Computer Science, University of Waterloo},
-    year	= 2003,
-    address	= {Waterloo, Ontario, Canada, N2L 3G1},
-    note	= {\href{http://plg.uwaterloo.ca/theses/BilsonThesis.pdf}{http://\-plg.uwaterloo.ca/\-theses/\-BilsonThesis.pdf}},
-}
-
-@article{Buhr94a,
-    keywords	= {assignment, parameter passing, multiple assignment},
-    contributer	= {pabuhr@plg},
-    author	= {P. A. Buhr and David Till and C. R. Zarnke},
-    title	= {Assignment as the Sole Means of Updating Objects},
-    journal	= spe,
-    month	= sep,
-    year	= 1994,
-    volume	= 24,
-    number	= 9,
-    pages	= {835-870},
-}
-
-@techreport{C11,
-    type = {International Standard},
-    keywords	= {ISO/IEC C 11},
-    contributer	= {pabuhr@plg},
-    key		= {{ISO/IEC} 9889-2011},
-    title	= {American National Standard Information technology -- Programming Languages -- {C}},
-    institution = {International Standard Organization},
-    address	= {http://www.iso.org},
-    year	= 2012,
-}
-
-@techreport{C++Concepts,
-    type = {International Standard},
-    keywords	= {ISO/IEC TS 19217:2015},
-    contributer	= {a3moss@uwaterloo.ca},
-    key		= {{ISO/IEC} {TS} 19217},
-    title	= {Information technology -- Programming languages -- {C}{\kern-.1em\hbox{\large\texttt{+\kern-.25em+}}} Extensions for concepts},
-    institution	= {International Standard Organization},
-    address	= {http://www.iso.org},
-    year	= 2015
-}
-
-@phdthesis{Ditchfield92,
-    keywords	= {C, parametric polymorphism, overloading},
-    contributer	= {pabuhr@plg},
-    author	= {Glen Jeffrey Ditchfield},
-    title	= {Contextual Polymorphism},
-    school	= {Department of Computer Science, University of Waterloo},
-    year	= 1992,
-    address	= {Waterloo, Ontario, Canada, N2L 3G1},
-    note	= {\href{http://plg.uwaterloo.ca/theses/DitchfieldThesis.pdf}{http://\-plg.uwaterloo.ca/\-theses/\-DitchfieldThesis.pdf}}
-}
-
-@article{Gro06,
- author = {Grossman, Dan},
- title = {Quantified Types in an Imperative Language},
- journal = {ACM Trans. Program. Lang. Syst.},
- issue_date = {May 2006},
- volume = {28},
- number = {3},
- month = may,
- year = {2006},
- issn = {0164-0925},
- pages = {429--475},
- numpages = {47},
- url = {http://doi.acm.org.proxy.lib.uwaterloo.ca/10.1145/1133651.1133653},
- doi = {10.1145/1133651.1133653},
- acmid = {1133653},
- publisher = {ACM},
- address = {New York, NY, USA},
-}
-
-@mastersthesis{Schluntz17,
-    author  = {Schluntz, Robert},
-    title   = {Resource Management and Tuples in C$\mathbf{\forall}$},
-    school	= {School of Computer Science, University of Waterloo},
-    year	= 2017,
-    address	= {Waterloo, Ontario, Canada, N2L 3G1},
-    note    = {[[unpublished]]}
-}
-
-@mastersthesis{Till89,
-    keywords	= {C, multiple return values, tuples},
-    contributer	= {pabuhr@plg},
-    author	= {David W. Till},
-    title	= {Tuples In Imperative Programming Languages},
-    school	= {Department of Computer Science, University of Waterloo},
-    year	= 1989,
-    address	= {Waterloo, Ontario, Canada, N2L 3G1},
-}
Index: doc/generic_types/generic_types.tex
===================================================================
--- doc/generic_types/generic_types.tex	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ doc/generic_types/generic_types.tex	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -49,11 +49,11 @@
 
 % Useful macros
-\newcommand{\CFA}{C\raisebox{\depth}{\rotatebox{180}{\textsf{A}}}\hspace{-1pt}\xspace} % Cforall symbolic name
-%\newcommand{\CFA}{C$\mathbf\forall$\xspace} % Cforall symbolic name
-\newcommand{\CC}{\rm C\kern-.1em\hbox{+\kern-.25em+}\xspace} % C++ symbolic name
-\newcommand{\CCeleven}{\rm C\kern-.1em\hbox{+\kern-.25em+}11\xspace} % C++11 symbolic name
-\newcommand{\CCfourteen}{\rm C\kern-.1em\hbox{+\kern-.25em+}14\xspace} % C++14 symbolic name
-\newcommand{\CCseventeen}{\rm C\kern-.1em\hbox{+\kern-.25em+}17\xspace} % C++17 symbolic name
-\newcommand{\CCtwenty}{\rm C\kern-.1em\hbox{+\kern-.25em+}20\xspace} % C++20 symbolic name
+\newcommand{\CFAIcon}{\textsf{C}\raisebox{\depth}{\rotatebox{180}{\textsf{A}}}\xspace} % Cforall symbolic name
+\newcommand{\CFA}{\protect\CFAIcon} % safe for section/caption
+\newcommand{\CC}{\textrm{C}\kern-.1em\hbox{+\kern-.25em+}\xspace} % C++ symbolic name
+\newcommand{\CCeleven}{\textrm{C}\kern-.1em\hbox{+\kern-.25em+}11\xspace} % C++11 symbolic name
+\newcommand{\CCfourteen}{\textrm{C}\kern-.1em\hbox{+\kern-.25em+}14\xspace} % C++14 symbolic name
+\newcommand{\CCseventeen}{\textrm{C}\kern-.1em\hbox{+\kern-.25em+}17\xspace} % C++17 symbolic name
+\newcommand{\CCtwenty}{\textrm{C}\kern-.1em\hbox{+\kern-.25em+}20\xspace} % C++20 symbolic name
 \newcommand{\CCV}{\rm C\kern-.1em\hbox{+\kern-.25em+}obj\xspace} % C++ virtual symbolic name
 \newcommand{\Csharp}{C\raisebox{-0.7ex}{\Large$^\sharp$}\xspace} % C# symbolic name
@@ -443,7 +443,7 @@
 This function could acquire the layout for @set(T)@ by calling its layout function with the layout of @T@ implicitly passed into the function.
 
-Whether a type is concrete, dtype-static, or dynamic is decided solely on the type parameters and @forall@ clause on a declaration.
-This design allows opaque forward declarations of generic types, \eg @forall(otype T) struct Box@ -- like in C, all uses of @Box(T)@ can be separately compiled, and callers from other translation units know the proper calling conventions to use.
-If the definition of a structure type is included in deciding whether a generic type is dynamic or concrete, some further types may be recognized as dtype-static (\eg @forall(otype T) struct unique_ptr { T * p }@ does not depend on @T@ for its layout, but the existence of an @otype@ parameter means that it \emph{could}.), but preserving separate compilation (and the associated C compatibility) in the existing design is judged to be an appropriate trade-off.
+Whether a type is concrete, dtype-static, or dynamic is decided solely on the @forall@'s type parameters.
+This design allows opaque forward declarations of generic types, \eg @forall(otype T)@ @struct Box@ -- like in C, all uses of @Box(T)@ can be separately compiled, and callers from other translation units know the proper calling conventions to use.
+If the definition of a structure type is included in deciding whether a generic type is dynamic or concrete, some further types may be recognized as dtype-static (\eg @forall(otype T)@ @struct unique_ptr { T * p }@ does not depend on @T@ for its layout, but the existence of an @otype@ parameter means that it \emph{could}.), but preserving separate compilation (and the associated C compatibility) in the existing design is judged to be an appropriate trade-off.
 
 
@@ -855,5 +855,7 @@
 }
 \end{lstlisting}
+\begin{sloppypar}
 Tuple expressions are then simply converted directly into compound literals, \eg @[5, 'x', 1.24]@ becomes @(_tuple3(int, char, double)){ 5, 'x', 1.24 }@.
+\end{sloppypar}
 
 \begin{comment}
Index: doc/man/README
===================================================================
--- doc/man/README	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
+++ doc/man/README	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -0,0 +1,5 @@
+There are troff variables at the beginning of the source files that define the
+home path to cfa and the version number.  The version variable should be set
+properly (we sometimes forget); change the path for the home variable to the
+location where cfa is installed. There is a command at the beginning of the
+source file to format the manual entry.
Index: doc/man/cfa.1
===================================================================
--- doc/man/cfa.1	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
+++ doc/man/cfa.1	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -0,0 +1,131 @@
+.\"                             -*- Mode: Nroff -*- 
+.\"  
+.\" Cforall Version 1.0.0 Copyright (C) 2017 University of Waterloo
+.\"
+.\" The contents of this file are covered under the licence agreement in the
+.\" file "LICENCE" distributed with Cforall.
+.\" 
+.\" cfa.1 -- 
+.\" 
+.\" Author           : Peter A. Buhr
+.\" Created On       : Wed Jul 26 22:34:47 2017
+.\" Last Modified By : Peter A. Buhr
+.\" Last Modified On : Thu Jul 27 10:29:29 2017
+.\" Update Count     : 44
+.\" 
+.\" nroff -man cfa.1
+.\" 
+.ds Ho "/usr/local
+.ds Mg "1
+.ds Mn "0
+.ds Pt "0
+.ds Vr "cfa-\*(Mg.\*(Mn.\*(Pt
+.ds Cf "Cforall
+.\" 
+.TH cfa 1 2017-07-27 cfa-\*(Mg
+.SH NAME
+cfa \- \*(Cf Translator and Runtime Library
+.SH SYNOPSIS
+cfa [gcc-options] [C/\*(Cf source-files] [assembler/loader files]
+.SH DESCRIPTION
+The cfa command compiles C and \*(Cf source files and links C/\*(Cf object
+files named on the command line.
+
+The cfa command introduces a translator pass over the specified source files
+after the C preprocessor but before the C compilation.  The translator converts
+new \*(Cf constructs into C statements.  The cfa command also provides the
+runtime library, which is linked with each \*(Cf application.
+
+The command line options depend on the particular C compiler used (gcc/clang
+supported).  As with most C compilers, the output is sent to the file a.out(5)
+unless the -o option is present on the command line.  See the reference pages
+for gcc(1) for more information.
+.SH OPTIONS
+When multiple conflicting options appear on the command line, e.g.,
+.B -debug
+followed by
+.B -nodebug,
+the last option takes precedence.
+.LP
+All of the options available to the gcc compiler are available to the cfa
+translator.  The following gcc flags are implicitly turned on:
+.IP -std=gnu99 3
+The 1999 C standard plus GNU extensions.
+.IP -fgnu89-inline
+Use the traditional GNU semantics for inline routines in C99 mode, which allows inline routines in header files.
+.LP
+The following additional options are available:
+.IP -CFA 3
+Only the C preprocessor and the \*(Cf translator steps are performed and the transformed program is written to standard output, which makes it possible to examine the code generated by the \*(Cf translator.
+The generated code starts with the standard \*(Cf prelude.
+.IP -debug
+The program is linked with the debugging version of the runtime system.
+The debug version performs runtime checks to help during the debugging phase of a \*(Cf program, but can substantially slow program execution.
+The runtime checks should only be removed after the program is completely debugged.
+.B This option is the default.
+.IP -nodebug
+The program is linked with the non-debugging version of the runtime system, so the execution of the program is faster.
+.I However, no runtime checks or asserts are performed so errors usually result in abnormal program behaviour or termination.
+.IP -help
+Information about the set of \*(Cf compilation flags is printed.
+.IP -nohelp
+Information about the set of \*(Cf compilation flags is not printed.
+.B This option is the default.
+.IP -quiet
+The \*(Cf compilation message is not printed at the beginning of a compilation.
+.IP -noquiet
+The \*(Cf compilation message is printed at the beginning of a compilation.
+.B This option is the default.
+.SH PREPROCESSOR VARIABLES
+When programs are compiled using cfa, the following preprocessor variables are
+available.  These variables allow conditional compilation of programs that must
+work differently in these situations.
+.IP __CFA_MAJOR__ 3
+is available during preprocessing and its value is the major version number of \*(Cf.
+.IP __CFA_MINOR__
+is available during preprocessing and its value is the minor version number of \*(Cf.
+.IP __CFA_PATCH__
+is available during preprocessing and its value is the patch level number of \*(Cf.
+.IP "__CFA__, __CFORALL__, and __cforall"
+are always available during preprocessing and have no value.
+.IP __CFA_DEBUG__
+is available during preprocessing if the -debug compilation option is
+specified.
+.SH FILES
+.DS B
+file.{c,cfa} - \*(Cf source file
+.br
+file.s - assembly language file
+.br
+file.o - object file
+.br
+\*(Ho/\*(Vr/bin/cfa - translator
+.br
+\*(Ho/\*(Vr/doc - reference manuals and documents
+.br
+\*(Ho/\*(Vr/include - header files
+.br
+\*(Ho/\*(Vr/lib - run time libraries
+.br
+\*(Ho/\*(Vr/man - command documentation
+.br
+\*(Ho/\*(Vr/src - source code (optional)
+.DE
+.SH SEE ALSO
+cpp(1), gcc(1), gdb(1)
+.SH REFERENCES
+.HP 3
+\*(Cf Reference and Rational Manual
+.br
+http://plg.uwaterloo.ca/~cforall/refrat.pdf
+.HP
+.I \*(Cf User Manual
+.br
+http://plg.uwaterloo.ca/~cforall/user.pdf
+.SH BUGS
+Bugs should be reported to trac@plg.cs.uwaterloo.ca.
+.SH COPYRIGHT
+\*(Cf is covered under the licence agreement in the distribution.
+.SH AUTHORS
+Andrew Beach, Richard Bilson, Peter A. Buhr, Thierry Delisle, Glen Ditchfield,
+Rodolfo G. Esteves, Aaron Moss, Rob Schluntz
Index: doc/refrat/Makefile
===================================================================
--- doc/refrat/Makefile	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ doc/refrat/Makefile	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -9,4 +9,6 @@
 SOURCES = ${addsuffix .tex, \
 refrat \
+keywords \
+operidents \
 }
 
Index: doc/refrat/keywords.tex
===================================================================
--- doc/refrat/keywords.tex	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
+++ doc/refrat/keywords.tex	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -0,0 +1,69 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -*- Mode: Latex -*- %%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% 
+%% Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+%%
+%% The contents of this file are covered under the licence agreement in the
+%% file "LICENCE" distributed with Cforall.
+%% 
+%% keywords.tex -- 
+%% 
+%% Author           : Peter A. Buhr
+%% Created On       : Sun Aug  6 08:17:27 2017
+%% Last Modified By : Peter A. Buhr
+%% Last Modified On : Sun Aug  6 08:31:42 2017
+%% Update Count     : 4
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{tabular}{@{}llllll@{}}
+\begin{tabular}{@{}l@{}}
+©_At©			\\
+©catch©			\\
+©catchResume©	\\
+©choose©		\\
+©coroutine©		\\
+\end{tabular}
+&
+\begin{tabular}{@{}l@{}}
+©disable©		\\
+©dtype©			\\
+©enable©		\\
+©fallthrough©	\\
+©fallthru©		\\
+\end{tabular}
+&
+\begin{tabular}{@{}l@{}}
+©finally©		\\
+©forall©		\\
+©ftype©			\\
+©lvalue©		\\
+©monitor©		\\
+\end{tabular}
+&
+\begin{tabular}{@{}l@{}}
+©mutex©			\\
+©one_t©			\\
+©otype©			\\
+©throw©			\\
+©throwResume©	\\
+\end{tabular}
+&
+\begin{tabular}{@{}l@{}}
+©trait©			\\
+©try©			\\
+©ttype©			\\
+©virtual©		\\
+©with©			\\
+\end{tabular}
+&
+\begin{tabular}{@{}l@{}}
+©zero_t©		\\
+				\\
+				\\
+				\\
+				\\
+\end{tabular}
+\end{tabular}
+% Local Variables: %
+% tab-width: 4 %
+% fill-column: 100 %
+% compile-command: "make" %
+% End: %
Index: doc/refrat/operidents.tex
===================================================================
--- doc/refrat/operidents.tex	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
+++ doc/refrat/operidents.tex	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -0,0 +1,75 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -*- Mode: Latex -*- %%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% 
+%% Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+%%
+%% The contents of this file are covered under the licence agreement in the
+%% file "LICENCE" distributed with Cforall.
+%% 
+%% operidents.tex -- 
+%% 
+%% Author           : Peter A. Buhr
+%% Created On       : Sun Aug  6 09:27:03 2017
+%% Last Modified By : Peter A. Buhr
+%% Last Modified On : Sun Aug  6 10:20:53 2017
+%% Update Count     : 25
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{tabular}{@{}l@{\hspace{\parindentlnth}}l@{\hspace{\parindentlnth}}l@{}}
+\begin{tabular}{@{}ll@{}}
+©?[?]©	& subscripting \impl{?[?]}					\\
+©?()©	& function call \impl{?()}					\\
+©?++©	& postfix increment \impl{?++}				\\
+©?--©	& postfix decrement \impl{?--}				\\
+©++?©	& prefix increment \impl{++?}				\\
+©--?©	& prefix decrement \impl{--?}				\\
+©*?©	& dereference \impl{*?}						\\
+©+?©	& unary plus \impl{+?}						\\
+©-?©	& arithmetic negation \impl{-?}				\\
+©~?©	& bitwise negation \impl{~?}				\\
+©!?©	& logical complement \impl{"!?}				\\
+©?\?©	& exponentiation \impl{?\?}					\\
+©?*?©	& multiplication \impl{?*?}					\\
+©?/?©	& division \impl{?/?}						\\
+©?%?©	& remainder \impl{?%?}						\\
+\end{tabular}
+&
+\begin{tabular}{@{}ll@{}}
+©?+?©	& addition \impl{?+?}						\\
+©?-?©	& subtraction \impl{?-?}					\\
+©?<<?©	& left shift \impl{?<<?}					\\
+©?>>?©	& right shift \impl{?>>?}					\\
+©?<?©	& less than \impl{?<?}						\\
+©?<=?©	& less than or equal \impl{?<=?}			\\
+©?>=?©	& greater than or equal \impl{?>=?}			\\
+©?>?©	& greater than \impl{?>?}					\\
+©?==?©	& equality \impl{?==?}						\\
+©?!=?©	& inequality \impl{?"!=?}					\\
+©?&?©	& bitwise AND \impl{?&?}					\\
+©?^?©	& exclusive OR \impl{?^?}					\\
+©?|?©	& inclusive OR \impl{?"|?}					\\
+													\\
+													\\
+\end{tabular}
+&
+\begin{tabular}{@{}ll@{}}
+©?=?©	& simple assignment \impl{?=?}				\\
+©?\=?©	& exponentiation assignment \impl{?\=?}		\\
+©?*=?©	& multiplication assignment \impl{?*=?}		\\
+©?/=?©	& division assignment \impl{?/=?}			\\
+©?%=?©	& remainder assignment \impl{?%=?}			\\
+©?+=?©	& addition assignment \impl{?+=?}			\\
+©?-=?©	& subtraction assignment \impl{?-=?}		\\
+©?<<=?©	& left-shift assignment \impl{?<<=?}		\\
+©?>>=?©	& right-shift assignment \impl{?>>=?}		\\
+©?&=?©	& bitwise AND assignment \impl{?&=?}		\\
+©?^=?©	& exclusive OR assignment \impl{?^=?}		\\
+©?|=?©	& inclusive OR assignment \impl{?"|=?}		\\
+													\\
+													\\
+													\\
+\end{tabular}
+\end{tabular}
+% Local Variables: %
+% tab-width: 4 %
+% fill-column: 100 %
+% compile-command: "make" %
+% End: %
Index: doc/refrat/refrat.tex
===================================================================
--- doc/refrat/refrat.tex	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ doc/refrat/refrat.tex	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -11,11 +11,11 @@
 %% Created On       : Wed Apr  6 14:52:25 2016
 %% Last Modified By : Peter A. Buhr
-%% Last Modified On : Fri Jun  2 10:43:14 2017
-%% Update Count     : 83
+%% Last Modified On : Sun Aug  6 10:25:31 2017
+%% Update Count     : 105
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 % requires tex packages: texlive-base texlive-latex-base tex-common texlive-humanities texlive-latex-extra texlive-fonts-recommended
 
-\documentclass[openright,twoside]{report}
+\documentclass[openright,twoside,11pt]{report}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -37,11 +37,19 @@
 \usepackage{mathptmx}                                   % better math font with "times"
 \usepackage[usenames]{color}
-\usepackage[pagewise]{lineno}
-\renewcommand{\linenumberfont}{\scriptsize\sffamily}
-\input{common}                                          % bespoke macros used in the document
+\input{common}                                          % common CFA document macros
 \usepackage[dvips,plainpages=false,pdfpagelabels,pdfpagemode=UseNone,colorlinks=true,pagebackref=true,linkcolor=blue,citecolor=blue,urlcolor=blue,pagebackref=true,breaklinks=true]{hyperref}
 \usepackage{breakurl}
 \renewcommand{\UrlFont}{\small\sf}
 
+\usepackage[pagewise]{lineno}
+\renewcommand{\linenumberfont}{\scriptsize\sffamily}
+\usepackage[firstpage]{draftwatermark}
+\SetWatermarkLightness{0.9}
+
+% Default underscore is too low and wide. Cannot use lstlisting "literate" as replacing underscore
+% removes it as a variable-name character so keywords in variables are highlighted. MUST APPEAR
+% AFTER HYPERREF.
+\renewcommand{\textunderscore}{\leavevmode\makebox[1.2ex][c]{\rule{1ex}{0.075ex}}}
+
 \setlength{\topmargin}{-0.45in}							% move running title into header
 \setlength{\headsep}{0.25in}
@@ -50,4 +58,7 @@
 
 \CFAStyle												% use default CFA format-style
+\lstnewenvironment{C++}[1][]                            % use C++ style
+{\lstset{language=C++,moredelim=**[is][\protect\color{red}]{®}{®}#1}}
+{}
 
 % inline code ©...© (copyright symbol) emacs: C-q M-)
@@ -87,5 +98,5 @@
 
 \date{
-DRAFT \\ \today
+\today
 }% date
 
@@ -112,8 +123,10 @@
 
 \clearpage
+\thispagestyle{plain}
 \pdfbookmark[1]{Contents}{section}
 \tableofcontents
 
 \clearpage
+\thispagestyle{plain}
 \pagenumbering{arabic}
 
@@ -417,11 +430,7 @@
 
 \begin{syntax}
-\oldlhs{keyword}
-\rhs ©forall©
-\rhs ©lvalue©
-\rhs ©trait©
-\rhs ©dtype©
-\rhs ©ftype©
-\rhs ©otype©
+\lhs{keyword} one of
+\rhs \dots
+\rhs \input{keywords}
 \end{syntax}
 
@@ -469,53 +478,6 @@
 
 \begin{table}[hbt]
-\hfil
-\begin{tabular}[t]{ll}
-%identifier & operation \\ \hline
-©?[?]© & subscripting \impl{?[?]}\\
-©?()© & function call \impl{?()}\\
-©?++© & postfix increment \impl{?++}\\
-©?--© & postfix decrement \impl{?--}\\
-©++?© & prefix increment \impl{++?}\\
-©--?© & prefix decrement \impl{--?}\\
-©*?© & dereference \impl{*?}\\
-©+?© & unary plus \impl{+?}\\
-©-?© & arithmetic negation \impl{-?}\\
-©~?© & bitwise negation \impl{~?}\\
-©!?© & logical complement \impl{"!?}\\
-©?*?© & multiplication \impl{?*?}\\
-©?/?© & division \impl{?/?}\\
-\end{tabular}\hfil
-\begin{tabular}[t]{ll}
-%identifier & operation \\ \hline
-©?%?© & remainder \impl{?%?}\\
-©?+?© & addition \impl{?+?}\\
-©?-?© & subtraction \impl{?-?}\\
-©?<<?© & left shift \impl{?<<?}\\
-©?>>?© & right shift \impl{?>>?}\\
-©?<?© & less than \impl{?<?}\\
-©?<=?© & less than or equal \impl{?<=?}\\
-©?>=?© & greater than or equal \impl{?>=?}\\
-©?>?© & greater than \impl{?>?}\\
-©?==?© & equality \impl{?==?}\\
-©?!=?© & inequality \impl{?"!=?}\\
-©?&?© & bitwise AND \impl{?&?}\\
-\end{tabular}\hfil
-\begin{tabular}[t]{ll}
-%identifier & operation \\ \hline
-©?^?© & exclusive OR \impl{?^?}\\
-©?|?© & inclusive OR \impl{?"|?}\\
-©?=?© & simple assignment \impl{?=?}\\
-©?*=?© & multiplication assignment \impl{?*=?}\\
-©?/=?© & division assignment \impl{?/=?}\\
-©?%=?© & remainder assignment \impl{?%=?}\\
-©?+=?© & addition assignment \impl{?+=?}\\
-©?-=?© & subtraction assignment \impl{?-=?}\\
-©?<<=?© & left-shift assignment \impl{?<<=?}\\
-©?>>=?© & right-shift assignment \impl{?>>=?}\\
-©?&=?© & bitwise AND assignment \impl{?&=?}\\
-©?^=?© & exclusive OR assignment \impl{?^=?}\\
-©?|=?© & inclusive OR assignment \impl{?"|=?}\\
-\end{tabular}
-\hfil
+\centering
+\input{operidents}
 \caption{Operator Identifiers}
 \label{opids}
Index: doc/rob_thesis/Makefile
===================================================================
--- doc/rob_thesis/Makefile	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ doc/rob_thesis/Makefile	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -1,87 +1,18 @@
-## Define the appropriate configuration variables.
-
-TeXLIB = .:../LaTeXmacros:../LaTeXmacros/listings:../LaTeXmacros/enumitem:../bibliography/:
+TeXLIB = .:../LaTeXmacros:../bibliography/:
 LaTeX  = TEXINPUTS=${TeXLIB} && export TEXINPUTS && pdflatex -halt-on-error
 BibTeX = BIBINPUTS=${TeXLIB} && export BIBINPUTS && bibtex
 
-## Define the text source files.
+all : thesis.pdf
 
-# SOURCES = ${addsuffix .tex, \
-# thesis \
-# }
+thesis.pdf : Makefile ../LaTeXmacros/common.tex cfa-format.tex thesis.tex intro.tex ctordtor.tex tuples.tex variadic.tex conclusions.tex
+	${LaTeX} thesis
+	${BibTeX} thesis
+	${LaTeX} thesis
+	${LaTeX} thesis
+	pdf2ps thesis.pdf thesis.ps
 
-# FIGURES = ${addsuffix .tex, \
-# }
-
-# PICTURES = ${addsuffix .pstex, \
-# }
-
-# PROGRAMS = ${addsuffix .tex, \
-# }
-
-# GRAPHS = ${addsuffix .tex, \
-# }
-
-# ## Define the documents that need to be made.
-
-# DOCUMENT = thesis.pdf
-
-# Directives #
-
-# all : ${DOCUMENT}
-
-# clean :
-# 	rm -f *.bbl *.aux *.dvi *.idx *.ilg *.ind *.brf *.out *.log *.toc *.blg *.pstex_t *.cf \
-# 		${FIGURES} ${PICTURES} ${PROGRAMS} ${GRAPHS} ${basename ${DOCUMENT}}.ps ${DOCUMENT}
-
-# File Dependencies #
-
-# ${DOCUMENT} : ${basename ${DOCUMENT}}.ps
-# 	ps2pdf $<
-
-# ${basename ${DOCUMENT}}.ps : ${basename ${DOCUMENT}}.dvi
-# 	dvips $< -o $@
-
-# ${basename ${DOCUMENT}}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} ${basename ${DOCUMENT}}.tex \
-# 		../LaTeXmacros/common.tex ../LaTeXmacros/indexstyle ../bibliography/cfa.bib
-# 	# Conditionally create an empty *.ind (index) file for inclusion until makeindex is run.
-# 	if [ ! -r ${basename $@}.ind ] ; then touch ${basename $@}.ind ; fi
-# 	# Must have *.aux file containing citations for bibtex
-# 	if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} ${basename $@}.tex ; fi
-# 	-${BibTeX} ${basename $@}
-# 	# Some citations reference others so run steps again to resolve these citations
-# 	${LaTeX} ${basename $@}.tex
-# 	-${BibTeX} ${basename $@}
-# 	# Make index from *.aux entries and input index at end of document
-# 	makeindex -s ../LaTeXmacros/indexstyle ${basename $@}.idx
-# 	${LaTeX} ${basename $@}.tex
-# 	# Run again to get index title into table of contents
-# 	${LaTeX} ${basename $@}.tex
-
-# predefined :
-# 	sed -f predefined.sed ${basename ${DOCUMENT}}.tex > ${basename $@}.cf
-
-# ## Define the default recipes.
-
-# %.tex : %.fig
-# 	fig2dev -L eepic $< > $@
-
-# %.ps : %.fig
-# 	fig2dev -L ps $< > $@
-
-# %.pstex : %.fig
-# 	fig2dev -L pstex $< > $@
-# 	fig2dev -L pstex_t -p $@ $< > $@_t
-
-
-all:
-	$(LaTeX) thesis
-	$(BibTeX) thesis
-	$(LaTeX) thesis
-	$(LaTeX) thesis
-
-clean:
+clean :
 	rm -f *.aux *.bbl *.blg *.lof *.log *.lot *.out *.toc
 
-splotless: clean
-	rm -f thesis.pdf
+spotless : clean
+	rm -f thesis.pdf thesis.ps
Index: doc/rob_thesis/thesis.tex
===================================================================
--- doc/rob_thesis/thesis.tex	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ doc/rob_thesis/thesis.tex	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -135,7 +135,7 @@
     pdfpagelabels=true,     % adds page number as label in Acrobat's page count
     bookmarks=true,         % show bookmarks bar?
-    unicode=false,          % non-Latin characters in Acrobat’s bookmarks
-    pdftoolbar=true,        % show Acrobat’s toolbar?
-    pdfmenubar=true,        % show Acrobat’s menu?
+    unicode=false,          % non-Latin characters in Acrobat's bookmarks
+    pdftoolbar=true,        % show Acrobat's toolbar?
+    pdfmenubar=true,        % show Acrobat's menu?
     pdffitwindow=false,     % window fit to page when opened
     pdfstartview={FitH},    % fits the width of the page to the window
Index: doc/user/Makefile
===================================================================
--- doc/user/Makefile	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ doc/user/Makefile	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -9,4 +9,6 @@
 SOURCES = ${addsuffix .tex, \
 user \
+../refrat/keywords \
+../refrat/operidents \
 }
 
Index: doc/user/user.tex
===================================================================
--- doc/user/user.tex	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ doc/user/user.tex	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -11,6 +11,6 @@
 %% Created On       : Wed Apr  6 14:53:29 2016
 %% Last Modified By : Peter A. Buhr
-%% Last Modified On : Sat Jul 22 11:01:19 2017
-%% Update Count     : 2878
+%% Last Modified On : Sun Aug  6 10:24:21 2017
+%% Update Count     : 3036
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
@@ -37,6 +37,4 @@
 \usepackage{mathptmx}                                   % better math font with "times"
 \usepackage[usenames]{color}
-\usepackage[pagewise]{lineno}
-\renewcommand{\linenumberfont}{\scriptsize\sffamily}
 \input{common}                                          % common CFA document macros
 \usepackage[dvips,plainpages=false,pdfpagelabels,pdfpagemode=UseNone,colorlinks=true,pagebackref=true,linkcolor=blue,citecolor=blue,urlcolor=blue,pagebackref=true,breaklinks=true]{hyperref}
@@ -44,8 +42,12 @@
 \renewcommand{\UrlFont}{\small\sf}
 
+\usepackage[pagewise]{lineno}
+\renewcommand{\linenumberfont}{\scriptsize\sffamily}
+\usepackage[firstpage]{draftwatermark}
+\SetWatermarkLightness{0.9}
+
 % Default underscore is too low and wide. Cannot use lstlisting "literate" as replacing underscore
 % removes it as a variable-name character so keywords in variables are highlighted. MUST APPEAR
 % AFTER HYPERREF.
-\renewcommand{\_}{\leavevmode\makebox[1.2ex][c]{\rule{1ex}{0.075ex}}}
 \renewcommand{\textunderscore}{\leavevmode\makebox[1.2ex][c]{\rule{1ex}{0.075ex}}}
 
@@ -56,6 +58,5 @@
 
 \CFAStyle												% use default CFA format-style
-
-\lstnewenvironment{C++}[1][]
+\lstnewenvironment{C++}[1][]                            % use C++ style
 {\lstset{language=C++,moredelim=**[is][\protect\color{red}]{®}{®}#1}}
 {}
@@ -78,4 +79,5 @@
 \newcommand{\B}[1]{{\Textbf[blue]{#1}}}
 \newcommand{\G}[1]{{\Textbf[OliveGreen]{#1}}}
+\newcommand{\KWC}{K-W C\xspace}
 
 \newsavebox{\LstBox}
@@ -105,5 +107,5 @@
 
 \date{
-DRAFT \\ \today
+\today
 }% date
 
@@ -197,5 +199,5 @@
 This document is a programmer reference-manual for the \CFA programming language.
 The manual covers the core features of the language and runtime-system, with simple examples illustrating syntax and semantics of each feature.
-The manual does not teach programming, i.e., how to combine the new constructs to build complex programs.
+The manual does not teach programming, \ie how to combine the new constructs to build complex programs.
 A reader should already have an intermediate knowledge of control flow, data structures, and concurrency issues to understand the ideas presented, as well as some experience programming in C/\CC.
 Implementers should refer to the \CFA Programming Language Specification for details about the language syntax and semantics.
@@ -247,7 +249,7 @@
 \section{History}
 
-The \CFA project started with \Index*{K-W C}~\cite{Buhr94a,Till89}, which extended C with new declaration syntax, multiple return values from routines, and advanced assignment capabilities using the notion of tuples.
+The \CFA project started with \Index*{Dave Till}\index{Till, Dave}'s \Index*{K-W C}~\cite{Buhr94a,Till89}, which extended C with new declaration syntax, multiple return values from routines, and advanced assignment capabilities using the notion of tuples.
 (See~\cite{Werther96} for similar work in \Index*[C++]{\CC{}}.)
-The first \CFA implementation of these extensions was by Esteves~\cite{Esteves04}.
+The first \CFA implementation of these extensions was by \Index*{Rodolfo Esteves}\index{Esteves, Rodolfo}~\cite{Esteves04}.
 
 The signature feature of \CFA is \emph{\Index{overload}able} \Index{parametric-polymorphic} functions~\cite{forceone:impl,Cormack90,Duggan96} with functions generalized using a ©forall© clause (giving the language its name):
@@ -257,5 +259,5 @@
 \end{lstlisting}
 % extending the C type system with parametric polymorphism and overloading, as opposed to the \Index*[C++]{\CC{}} approach of object-oriented extensions.
-\CFA{}\hspace{1pt}'s polymorphism was originally formalized by Ditchfield~\cite{Ditchfield92}, and first implemented by Bilson~\cite{Bilson03}.
+\CFA{}\hspace{1pt}'s polymorphism was originally formalized by \Index*{Glen Ditchfield}\index{Ditchfield, Glen}~\cite{Ditchfield92}, and first implemented by \Index*{Richard Bilson}\index{Bilson, Richard}~\cite{Bilson03}.
 However, at that time, there was little interesting in extending C, so work did not continue.
 As the saying goes, ``\Index*{What goes around, comes around.}'', and there is now renewed interest in the C programming language because of legacy code-bases, so the \CFA project has been restarted.
@@ -344,5 +346,5 @@
 The command ©cfa© is used to compile a \CFA program and is based on the \Index{GNU} \Indexc{gcc} command, \eg:
 \begin{cfa}
-cfa§\indexc{cfa}\index{compilation!cfa@©cfa©}§ [ gcc-options ] C/§\CFA{}§-files [ assembler/loader-files ]
+cfa§\indexc{cfa}\index{compilation!cfa@©cfa©}§ [ gcc-options ] [ C/§\CFA{}§ source-files ] [ assembler/loader files ]
 \end{cfa}
 \CFA programs having the following ©gcc© flags turned on:
@@ -509,10 +511,10 @@
 For both ©continue© and ©break©, the target label must be directly associated with a ©for©, ©while© or ©do© statement;
 for ©break©, the target label can also be associated with a ©switch©, ©if© or compound (©{}©) statement.
-\VRef[Figure]{f:MultiLevelResumeTermination} shows the labelled ©continue© and ©break©, specifying which control structure is the target for exit, and the corresponding C program using only ©goto©.
-The innermost loop has 7 exit points, which cause resumption or termination of one or more of the 7 \Index{nested control-structure}s.
+\VRef[Figure]{f:MultiLevelExit} shows ©continue© and ©break© indicating the specific control structure, and the corresponding C program using only ©goto© and labels.
+The innermost loop has 7 exit points, which cause continuation or termination of one or more of the 7 \Index{nested control-structure}s.
 
 \begin{figure}
-\begin{tabular}{@{\hspace{\parindentlnth}}l@{\hspace{1.5em}}l@{}}
-\multicolumn{1}{c@{\hspace{1.5em}}}{\textbf{\CFA}}	& \multicolumn{1}{c}{\textbf{C}}	\\
+\begin{tabular}{@{\hspace{\parindentlnth}}l@{\hspace{\parindentlnth}}l@{\hspace{\parindentlnth}}l@{}}
+\multicolumn{1}{@{\hspace{\parindentlnth}}c@{\hspace{\parindentlnth}}}{\textbf{\CFA}}	& \multicolumn{1}{@{\hspace{\parindentlnth}}c}{\textbf{C}}	\\
 \begin{cfa}
 ®LC:® {
@@ -523,15 +525,15 @@
 			®LF:® for ( ... ) {
 				®LW:® while ( ... ) {
-					... break ®LC®; ...		// terminate compound
-					... break ®LS®; ...		// terminate switch
-					... break ®LIF®; ...	// terminate if
-					... continue ®LF;® ...	// resume loop
-					... break ®LF®; ...		// terminate loop
-					... continue ®LW®; ...	// resume loop
-					... break ®LW®; ...		// terminate loop
+					... break ®LC®; ...
+					... break ®LS®; ...
+					... break ®LIF®; ...
+					... continue ®LF;® ...
+					... break ®LF®; ...
+					... continue ®LW®; ...
+					... break ®LW®; ...
 				} // while
 			} // for
 		} else {
-			... break ®LIF®; ...			// terminate if
+			... break ®LIF®; ...
 		} // if
 	} // switch
@@ -562,58 +564,32 @@
 } ®LC:® ;
 \end{cfa}
+&
+\begin{cfa}
+
+
+
+
+
+
+
+// terminate compound
+// terminate switch
+// terminate if
+// continue loop
+// terminate loop
+// continue loop
+// terminate loop
+
+
+
+// terminate if
+
+
+
+\end{cfa}
 \end{tabular}
-\caption{Multi-level Resume/Termination}
-\label{f:MultiLevelResumeTermination}
+\caption{Multi-level Exit}
+\label{f:MultiLevelExit}
 \end{figure}
-
-\begin{comment}
-int main() {
-  LC: {
-	  LS: switch ( 1 ) {
-		  case 3:
-		  LIF: if ( 1 ) {
-			  LF: for ( ;; ) {
-				  LW: while ( 1 ) {
-						break LC;		// terminate compound
-						break LS;		// terminate switch
-						break LIF;		// terminate if
-						continue LF;	// resume loop
-						break LF;		// terminate loop
-						continue LW;	// resume loop
-						break LW;		// terminate loop
-					} // while
-				} // for
-			} else {
-				break LIF;				 // terminate if
-			} // if
-		} // switch
-	} // compound
-	{
-		switch ( 1 ) {
-		  case 3:
-			if ( 1 ) {
-				for ( ;; ) {
-					while ( 1 ) {
-						goto LCx;
-						goto LSx;
-						goto LIF;
-						goto LFC;
-						goto LFB;
-						goto LWC;
-						goto LWB;
-					  LWC: ; } LWB: ;
-				  LFC: ; } LFB: ;
-			} else {
-				goto LIF;
-			} L3: ;
-		} LSx: ;
-	} LCx: ;
-}
-
-// Local Variables: //
-// tab-width: 4 //
-// End: //
-\end{comment}
-
 
 Both labelled ©continue© and ©break© are a ©goto©\index{goto@\lstinline $goto$!restricted} restricted in the following ways:
@@ -920,8 +896,8 @@
 class C {
 	int i, j;
-	int mem() {		 ®// implicit "this" parameter
-®		i = 1;		®// this->i
-®		j = 3;		®// this->j
-®	}
+	int mem() {					§\C{\color{red}// implicit "this" parameter}§
+		i = 1;					§\C{\color{red}// this->i}§
+		j = 2;					§\C{\color{red}// this->j}§
+	}
 }
 \end{C++}
@@ -929,6 +905,6 @@
 \begin{cfa}
 struct S { int i, j; };
-int mem( S &this ) {	// explicit "this" parameter
-	®this.®i = 1;			  // "this" is not elided
+int mem( S &®this® ) {			§\C{// explicit "this" parameter}§
+	®this.®i = 1;				§\C{// "this" is not elided}§
 	®this.®j = 2;
 }
@@ -938,8 +914,8 @@
 \CFA provides a ©with© clause/statement (see Pascal~\cite[\S~4.F]{Pascal}) to elided the "©this.©" by opening a scope containing field identifiers, changing the qualified fields into variables and giving an opportunity for optimizing qualified references.
 \begin{cfa}
-int mem( S &this ) ®with this® {	// with clause
-	i = 1;			®// this.i
-®	j = 2;			®// this.j
-®}
+int mem( S &this ) ®with this® { §\C{// with clause}§
+	i = 1;						§\C{\color{red}// this->i}§
+	j = 2;						§\C{\color{red}// this->j}§
+}
 \end{cfa}
 which extends to multiple routine parameters:
@@ -992,5 +968,5 @@
 Exception handling provides two mechanism: change of control flow from a raise to a handler, and communication from the raise to the handler.
 Transfer of control can be local, within a routine, or non-local, among routines.
-Non-local transfer can cause stack unwinding, i.e., non-local routine termination, depending on the kind of raise.
+Non-local transfer can cause stack unwinding, \ie non-local routine termination, depending on the kind of raise.
 \begin{cfa}
 exception_t E {};				§\C{// exception type}§
@@ -1001,7 +977,7 @@
 try {
 	f(...);
-} catch( E e : §boolean-predicate§ ) {			§\C{// termination handler}§
+} catch( E e : §boolean-predicate§ ) {			§\C[8cm]{// termination handler}§
 	// recover and continue
-} catchResume( E e : §boolean-predicate§ ) {	§\C{// resumption handler}§
+} catchResume( E e : §boolean-predicate§ ) {	§\C{// resumption handler}\CRT§
 	// repair and return
 } finally {
@@ -1230,6 +1206,6 @@
 
 As for \Index{division}, there are exponentiation operators for integral and floating-point types, including the builtin \Index{complex} types.
-Unsigned integral exponentiation\index{exponentiation!unsigned integral} is performed with repeated multiplication (or shifting if the base is 2).
-Signed integral exponentiation\index{exponentiation!signed integral} is performed with repeated multiplication (or shifting if the base is 2), but yields a floating-point result because $b^{-e}=1/b^e$.
+Unsigned integral exponentiation\index{exponentiation!unsigned integral} is performed with repeated multiplication\footnote{The multiplication computation is optimized to $O(\log y)$.} (or shifting if the base is 2).
+Signed integral exponentiation\index{exponentiation!signed integral} is performed with repeated multiplication (or shifting if the base is 2), but yields a floating-point result because $x^{-y}=1/x^y$.
 Hence, it is important to designate exponent integral-constants as unsigned or signed: ©3 \ 3u© return an integral result, while ©3 \ 3© returns a floating-point result.
 Floating-point exponentiation\index{exponentiation!floating point} is performed using \Index{logarithm}s\index{exponentiation!logarithm}, so the base cannot be negative.
@@ -1446,8 +1422,8 @@
 int w, x, y, z, & ar[3] = { x, y, z }; §\C{// initialize array of references}§
 &ar[1] = &w;						§\C{// change reference array element}§
-typeof( ar[1] ) p;					§\C{// (gcc) is int, i.e., the type of referenced object}§
-typeof( &ar[1] ) q;					§\C{// (gcc) is int \&, i.e., the type of reference}§
-sizeof( ar[1] ) == sizeof( int );	§\C{// is true, i.e., the size of referenced object}§
-sizeof( &ar[1] ) == sizeof( int *)	§\C{// is true, i.e., the size of a reference}§
+typeof( ar[1] ) p;					§\C{// (gcc) is int, \ie the type of referenced object}§
+typeof( &ar[1] ) q;					§\C{// (gcc) is int \&, \ie the type of reference}§
+sizeof( ar[1] ) == sizeof( int );	§\C{// is true, \ie the size of referenced object}§
+sizeof( &ar[1] ) == sizeof( int *)	§\C{// is true, \ie the size of a reference}§
 \end{cfa}
 
@@ -1788,5 +1764,5 @@
 
 In detail, the brackets, ©[]©, enclose the result type, where each return value is named and that name is a local variable of the particular return type.\footnote{
-\Index*{Michael Tiemann}, with help from \Index*{Doug Lea}, provided named return values in g++, circa 1989.}
+\Index*{Michael Tiemann}\index{Tiemann, Michael}, with help from \Index*{Doug Lea}\index{Lea, Doug}, provided named return values in g++, circa 1989.}
 The value of each local return variable is automatically returned at routine termination.
 Declaration qualifiers can only appear at the start of a routine definition, \eg:
@@ -2245,4 +2221,580 @@
 
 Currently, there are no \Index{lambda} expressions, \ie unnamed routines because routine names are very important to properly select the correct routine.
+
+
+\section{Tuple}
+
+In C and \CFA, lists of elements appear in several contexts, such as the parameter list of a routine call.
+\begin{cfa}
+f( ®2, x, 3 + i® );				§\C{// element list}§
+\end{cfa}
+A list of elements is called a \newterm{tuple}, and is different from a \Index{comma expression}.
+
+
+\subsection{Multiple-Return-Value Functions}
+\label{s:MRV_Functions}
+
+In standard C, functions can return at most one value.
+To emulate functions with multiple return values, \emph{\Index{aggregation}} and/or \emph{\Index{aliasing}} is used.
+In the former situation, the function designer creates a record type that combines all of the return values into a single type.
+For example, consider a function returning the most frequently occurring letter in a string, and its frequency.
+This example is complex enough to illustrate that an array is insufficient, since arrays are homogeneous, and demonstrates a potential pitfall that exists with aliasing.
+\begin{cfa}
+struct mf_ret {
+	int freq;
+	char ch;
+};
+
+struct mf_ret most_frequent(const char * str) {
+	char freqs [26] = { 0 };
+	struct mf_ret ret = { 0, 'a' };
+	for (int i = 0; str[i] != '\0'; ++i) {
+		if (isalpha(str[i])) {        // only count letters
+			int ch = tolower(str[i]);   // convert to lower case
+			int idx = ch-'a';
+			if (++freqs[idx] > ret.freq) {  // update on new max
+			  ret.freq = freqs[idx];
+			  ret.ch = ch;
+			}
+		}
+	}
+	return ret;
+}
+
+const char * str = "hello world";
+struct mf_ret ret = most_frequent(str);
+printf("%s -- %d %c\n", str, ret.freq, ret.ch);
+\end{cfa}
+Of note, the designer must come up with a name for the return type and for each of its fields.
+Unnecessary naming is a common programming language issue, introducing verbosity and a complication of the user's mental model.
+That is, adding another named type creates another association in the programmer's mind that needs to be kept track of when reading and writing code.
+As such, this technique is effective when used sparingly, but can quickly get out of hand if many functions need to return different combinations of types.
+
+In the latter approach, the designer simulates multiple return values by passing the additional return values as pointer parameters.
+The pointer parameters are assigned inside of the routine body to emulate a return.
+Using the same example,
+\begin{cfa}
+int most_frequent(const char * str, char * ret_ch) {
+	char freqs [26] = { 0 };
+	int ret_freq = 0;
+	for (int i = 0; str[i] != '\0'; ++i) {
+		if (isalpha(str[i])) {        // only count letters
+			int ch = tolower(str[i]);   // convert to lower case
+			int idx = ch-'a';
+			if (++freqs[idx] > ret_freq) {  // update on new max
+			  ret_freq = freqs[idx];
+			  *ret_ch = ch;   // assign to out parameter
+			}
+		}
+	}
+	return ret_freq;  // only one value returned directly
+}
+
+const char * str = "hello world";
+char ch;                            // pre-allocate return value
+int freq = most_frequent(str, &ch); // pass return value as out parameter
+printf("%s -- %d %c\n", str, freq, ch);
+\end{cfa}
+Notably, using this approach, the caller is directly responsible for allocating storage for the additional temporary return values, which complicates the call site with a sequence of variable declarations leading up to the call.
+Also, while a disciplined use of ©const© can give clues about whether a pointer parameter is going to be used as an out parameter, it is not immediately obvious from only the routine signature whether the callee expects such a parameter to be initialized before the call.
+Furthermore, while many C routines that accept pointers are designed so that it is safe to pass ©NULL© as a parameter, there are many C routines that are not null-safe.
+On a related note, C does not provide a standard mechanism to state that a parameter is going to be used as an additional return value, which makes the job of ensuring that a value is returned more difficult for the compiler.
+Interestingly, there is a subtle bug in the previous example, in that ©ret_ch© is never assigned for a string that does not contain any letters, which can lead to undefined behaviour.
+In this particular case, it turns out that the frequency return value also doubles as an error code, where a frequency of 0 means the character return value should be ignored.
+Still, not every routine with multiple return values should be required to return an error code, and error codes are easily ignored, so this is not a satisfying solution.
+As with the previous approach, this technique can simulate multiple return values, but in practice it is verbose and error prone.
+
+In \CFA, functions can be declared to return multiple values with an extension to the function declaration syntax.
+Multiple return values are declared as a comma-separated list of types in square brackets in the same location that the return type appears in standard C function declarations.
+The ability to return multiple values from a function requires a new syntax for the return statement.
+For consistency, the return statement in \CFA accepts a comma-separated list of expressions in square brackets.
+The expression resolution phase of the \CFA translator ensures that the correct form is used depending on the values being returned and the return type of the current function.
+A multiple-returning function with return type ©T© can return any expression that is implicitly convertible to ©T©.
+Using the running example, the ©most_frequent© function can be written using multiple return values as such,
+\begin{cfa}
+[int, char] most_frequent(const char * str) {
+	char freqs [26] = { 0 };
+	int ret_freq = 0;
+	char ret_ch = 'a';  // arbitrary default value for consistent results
+	for (int i = 0; str[i] != '\0'; ++i) {
+		if (isalpha(str[i])) {        // only count letters
+			int ch = tolower(str[i]);   // convert to lower case
+			int idx = ch-'a';
+			if (++freqs[idx] > ret_freq) {  // update on new max
+			  ret_freq = freqs[idx];
+			  ret_ch = ch;
+			}
+		}
+	}
+	return [ret_freq, ret_ch];
+}
+\end{cfa}
+This approach provides the benefits of compile-time checking for appropriate return statements as in aggregation, but without the required verbosity of declaring a new named type, which precludes the bug seen with out-parameters.
+
+The addition of multiple-return-value functions necessitates a syntax for accepting multiple values at the call-site.
+The simplest mechanism for retaining a return value in C is variable assignment.
+By assigning the return value into a variable, its value can be retrieved later at any point in the program.
+As such, \CFA allows assigning multiple values from a function into multiple variables, using a square-bracketed list of lvalue expressions on the left side.
+\begin{cfa}
+const char * str = "hello world";
+int freq;
+char ch;
+[freq, ch] = most_frequent(str);  // assign into multiple variables
+printf("%s -- %d %c\n", str, freq, ch);
+\end{cfa}
+It is also common to use a function's output as the input to another function.
+\CFA also allows this case, without any new syntax.
+When a function call is passed as an argument to another call, the expression resolver attempts to find the best match of actual arguments to formal parameters given all of the possible expression interpretations in the current scope \cite{Bilson03}.
+For example,
+\begin{cfa}
+void process(int);       // (1)
+void process(char);      // (2)
+void process(int, char); // (3)
+void process(char, int); // (4)
+
+process(most_frequent("hello world"));  // selects (3)
+\end{cfa}
+In this case, there is only one option for a function named ©most_frequent© that takes a string as input.
+This function returns two values, one ©int© and one ©char©.
+There are four options for a function named ©process©, but only two that accept two arguments, and of those the best match is (3), which is also an exact match.
+This expression first calls ©most_frequent("hello world")©, which produces the values ©3© and ©'l'©, which are fed directly to the first and second parameters of (3), respectively.
+
+\section{Tuple Expressions}
+Multiple-return-value functions provide \CFA with a new syntax for expressing a combination of expressions in the return statement and a combination of types in a function signature.
+These notions can be generalized to provide \CFA with \emph{tuple expressions} and \emph{tuple types}.
+A tuple expression is an expression producing a fixed-size, ordered list of values of heterogeneous types.
+The type of a tuple expression is the tuple of the subexpression types, or a \emph{tuple type}.
+In \CFA, a tuple expression is denoted by a comma-separated list of expressions enclosed in square brackets.
+For example, the expression ©[5, 'x', 10.5]© has type ©[int, char, double]©.
+The previous expression has 3 \emph{components}.
+Each component in a tuple expression can be any \CFA expression, including another tuple expression.
+The order of evaluation of the components in a tuple expression is unspecified, to allow a compiler the greatest flexibility for program optimization.
+It is, however, guaranteed that each component of a tuple expression is evaluated for side-effects, even if the result is not used.
+Multiple-return-value functions can equivalently be called \emph{tuple-returning functions}.
+
+\subsection{Tuple Variables}
+The call-site of the ©most_frequent© routine has a notable blemish, in that it required the preallocation of return variables in a manner similar to the aliasing example, since it is impossible to declare multiple variables of different types in the same declaration in standard C.
+In \CFA, it is possible to overcome this restriction by declaring a \emph{tuple variable}.
+\begin{cfa}[emph=ret, emphstyle=\color{red}]
+const char * str = "hello world";
+[int, char] ret = most_frequent(str);  // initialize tuple variable
+printf("%s -- %d %c\n", str, ret);
+\end{cfa}
+It is now possible to accept multiple values into a single piece of storage, in much the same way that it was previously possible to pass multiple values from one function call to another.
+These variables can be used in any of the contexts where a tuple expression is allowed, such as in the ©printf© function call.
+As in the ©process© example, the components of the tuple value are passed as separate parameters to ©printf©, allowing very simple printing of tuple expressions.
+One way to access the individual components is with a simple assignment, as in previous examples.
+\begin{cfa}
+int freq;
+char ch;
+[freq, ch] = ret;
+\end{cfa}
+
+\begin{sloppypar}
+In addition to variables of tuple type, it is also possible to have pointers to tuples, and arrays of tuples.
+Tuple types can be composed of any types, except for array types, since array assignment is disallowed, which makes tuple assignment difficult when a tuple contains an array.
+\begin{cfa}
+[double, int] di;
+[double, int] * pdi
+[double, int] adi[10];
+\end{cfa}
+This examples declares a variable of type ©[double, int]©, a variable of type pointer to ©[double, int]©, and an array of ten ©[double, int]©.
+\end{sloppypar}
+
+\subsection{Tuple Indexing}
+
+At times, it is desirable to access a single component of a tuple-valued expression without creating unnecessary temporary variables to assign to.
+Given a tuple-valued expression ©e© and a compile-time constant integer $i$ where $0 \leq i < n$, where $n$ is the number of components in ©e©, ©e.i© accesses the $i$\textsuperscript{th} component of ©e©.
+For example,
+\begin{cfa}
+[int, double] x;
+[char *, int] f();
+void g(double, int);
+[int, double] * p;
+
+int y = x.0;							§\C{// access int component of x}§
+y = f().1;								§\C{// access int component of f}§
+p->0 = 5;								§\C{// access int component of tuple pointed-to by p}§
+g( x.1, x.0 );							§\C{// rearrange x to pass to g}§
+double z = [x, f()].0.1;				§\C{// access second component of first component of tuple expression}§
+\end{cfa}
+As seen above, tuple-index expressions can occur on any tuple-typed expression, including tuple-returning functions, square-bracketed tuple expressions, and other tuple-index expressions, provided the retrieved component is also a tuple.
+This feature was proposed for \KWC but never implemented \cite[p.~45]{Till89}.
+
+\subsection{Flattening and Structuring}
+As evident in previous examples, tuples in \CFA do not have a rigid structure.
+In function call contexts, tuples support implicit flattening and restructuring conversions.
+Tuple flattening recursively expands a tuple into the list of its basic components.
+Tuple structuring packages a list of expressions into a value of tuple type.
+\begin{cfa}
+int f(int, int);
+int g([int, int]);
+int h(int, [int, int]);
+[int, int] x;
+int y;
+
+f(x);      // flatten
+g(y, 10);  // structure
+h(x, y);   // flatten & structure
+\end{cfa}
+In \CFA, each of these calls is valid.
+In the call to ©f©, ©x© is implicitly flattened so that the components of ©x© are passed as the two arguments to ©f©.
+For the call to ©g©, the values ©y© and ©10© are structured into a single argument of type ©[int, int]© to match the type of the parameter of ©g©.
+Finally, in the call to ©h©, ©x© is flattened to yield an argument list of length 3, of which the first component of ©x© is passed as the first parameter of ©h©, and the second component of ©x© and ©y© are structured into the second argument of type ©[int, int]©.
+The flexible structure of tuples permits a simple and expressive function-call syntax to work seamlessly with both single- and multiple-return-value functions, and with any number of arguments of arbitrarily complex structure.
+
+In \KWC \cite{Buhr94a,Till89}, there were 4 tuple coercions: opening, closing, flattening, and structuring.
+Opening coerces a tuple value into a tuple of values, while closing converts a tuple of values into a single tuple value.
+Flattening coerces a nested tuple into a flat tuple, \ie it takes a tuple with tuple components and expands it into a tuple with only non-tuple components.
+Structuring moves in the opposite direction, \ie it takes a flat tuple value and provides structure by introducing nested tuple components.
+
+In \CFA, the design has been simplified to require only the two conversions previously described, which trigger only in function call and return situations.
+This simplification is a primary contribution of this thesis to the design of tuples in \CFA.
+Specifically, the expression resolution algorithm examines all of the possible alternatives for an expression to determine the best match.
+In resolving a function call expression, each combination of function value and list of argument alternatives is examined.
+Given a particular argument list and function value, the list of argument alternatives is flattened to produce a list of non-tuple valued expressions.
+Then the flattened list of expressions is compared with each value in the function's parameter list.
+If the parameter's type is not a tuple type, then the current argument value is unified with the parameter type, and on success the next argument and parameter are examined.
+If the parameter's type is a tuple type, then the structuring conversion takes effect, recursively applying the parameter matching algorithm using the tuple's component types as the parameter list types.
+Assuming a successful unification, eventually the algorithm gets to the end of the tuple type, which causes all of the matching expressions to be consumed and structured into a tuple expression.
+For example, in
+\begin{cfa}
+int f(int, [double, int]);
+f([5, 10.2], 4);
+\end{cfa}
+There is only a single definition of ©f©, and 3 arguments with only single interpretations.
+First, the argument alternative list ©[5, 10.2], 4© is flattened to produce the argument list ©5, 10.2, 4©.
+Next, the parameter matching algorithm begins, with $P = $©int© and $A = $©int©, which unifies exactly.
+Moving to the next parameter and argument, $P = $©[double, int]© and $A = $©double©.
+This time, the parameter is a tuple type, so the algorithm applies recursively with $P' = $©double© and $A = $©double©, which unifies exactly.
+Then $P' = $©int© and $A = $©double©, which again unifies exactly.
+At this point, the end of $P'$ has been reached, so the arguments ©10.2, 4© are structured into the tuple expression ©[10.2, 4]©.
+Finally, the end of the parameter list $P$ has also been reached, so the final expression is ©f(5, [10.2, 4])©.
+
+\section{Tuple Assignment}
+\label{s:TupleAssignment}
+An assignment where the left side of the assignment operator has a tuple type is called tuple assignment.
+There are two kinds of tuple assignment depending on whether the right side of the assignment operator has a tuple type or a non-tuple type, called \emph{Multiple} and \emph{Mass} Assignment, respectively.
+\begin{cfa}
+int x;
+double y;
+[int, double] z;
+[y, x] = 3.14;  // mass assignment
+[x, y] = z;     // multiple assignment
+z = 10;         // mass assignment
+z = [x, y];     // multiple assignment
+\end{cfa}
+Let $L_i$ for $i$ in $[0, n)$ represent each component of the flattened left side, $R_i$ represent each component of the flattened right side of a multiple assignment, and $R$ represent the right side of a mass assignment.
+
+For a multiple assignment to be valid, both tuples must have the same number of elements when flattened.
+For example, the following is invalid because the number of components on the left does not match the number of components on the right.
+\begin{cfa}
+[int, int] x, y, z;
+[x, y] = z;   // multiple assignment, invalid 4 != 2
+\end{cfa}
+Multiple assignment assigns $R_i$ to $L_i$ for each $i$.
+That is, ©?=?(&$L_i$, $R_i$)© must be a well-typed expression.
+In the previous example, ©[x, y] = z©, ©z© is flattened into ©z.0, z.1©, and the assignments ©x = z.0© and ©y = z.1© happen.
+
+A mass assignment assigns the value $R$ to each $L_i$.
+For a mass assignment to be valid, ©?=?(&$L_i$, $R$)© must be a well-typed expression.
+These semantics differ from C cascading assignment (\eg ©a=b=c©) in that conversions are applied to $R$ in each individual assignment, which prevents data loss from the chain of conversions that can happen during a cascading assignment.
+For example, ©[y, x] = 3.14© performs the assignments ©y = 3.14© and ©x = 3.14©, which results in the value ©3.14© in ©y© and the value ©3© in ©x©.
+On the other hand, the C cascading assignment ©y = x = 3.14© performs the assignments ©x = 3.14© and ©y = x©, which results in the value ©3© in ©x©, and as a result the value ©3© in ©y© as well.
+
+Both kinds of tuple assignment have parallel semantics, such that each value on the left side and right side is evaluated \emph{before} any assignments occur.
+As a result, it is possible to swap the values in two variables without explicitly creating any temporary variables or calling a function.
+\begin{cfa}
+int x = 10, y = 20;
+[x, y] = [y, x];
+\end{cfa}
+After executing this code, ©x© has the value ©20© and ©y© has the value ©10©.
+
+In \CFA, tuple assignment is an expression where the result type is the type of the left side of the assignment, as in normal assignment.
+That is, a tuple assignment produces the value of the left-hand side after assignment.
+These semantics allow cascading tuple assignment to work out naturally in any context where a tuple is permitted.
+These semantics are a change from the original tuple design in \KWC \cite{Till89}, wherein tuple assignment was a statement that allows cascading assignments as a special case.
+Restricting tuple assignment to statements was an attempt to to fix what was seen as a problem with side-effects, wherein assignment can be used in many different locations, such as in function-call argument position.
+While permitting assignment as an expression does introduce the potential for subtle complexities, it is impossible to remove assignment expressions from \CFA without affecting backwards compatibility.
+Furthermore, there are situations where permitting assignment as an expression improves readability by keeping code succinct and reducing repetition, and complicating the definition of tuple assignment puts a greater cognitive burden on the user.
+In another language, tuple assignment as a statement could be reasonable, but it would be inconsistent for tuple assignment to be the only kind of assignment that is not an expression.
+In addition, \KWC permits the compiler to optimize tuple assignment as a block copy, since it does not support user-defined assignment operators.
+This optimization could be implemented in \CFA, but it requires the compiler to verify that the selected assignment operator is trivial.
+
+The following example shows multiple, mass, and cascading assignment used in one expression
+\begin{cfa}
+	int a, b;
+	double c, d;
+	[void] f([int, int]);
+	f([c, a] = [b, d] = 1.5);  // assignments in parameter list
+\end{cfa}
+The tuple expression begins with a mass assignment of ©1.5© into ©[b, d]©, which assigns ©1.5© into ©b©, which is truncated to ©1©, and ©1.5© into ©d©, producing the tuple ©[1, 1.5]© as a result.
+That tuple is used as the right side of the multiple assignment (\ie, ©[c, a] = [1, 1.5]©) that assigns ©1© into ©c© and ©1.5© into ©a©, which is truncated to ©1©, producing the result ©[1, 1]©.
+Finally, the tuple ©[1, 1]© is used as an expression in the call to ©f©.
+
+\subsection{Tuple Construction}
+Tuple construction and destruction follow the same rules and semantics as tuple assignment, except that in the case where there is no right side, the default constructor or destructor is called on each component of the tuple.
+As constructors and destructors did not exist in previous versions of \CFA or in \KWC, this is a primary contribution of this thesis to the design of tuples.
+\begin{cfa}
+struct S;
+void ?{}(S *);         // (1)
+void ?{}(S *, int);    // (2)
+void ?{}(S * double);  // (3)
+void ?{}(S *, S);      // (4)
+
+[S, S] x = [3, 6.28];  // uses (2), (3), specialized constructors
+[S, S] y;              // uses (1), (1), default constructor
+[S, S] z = x.0;        // uses (4), (4), copy constructor
+\end{cfa}
+In this example, ©x© is initialized by the multiple constructor calls ©?{}(&x.0, 3)© and ©?{}(&x.1, 6.28)©, while ©y© is initialized by two default constructor calls ©?{}(&y.0)© and ©?{}(&y.1)©.
+©z© is initialized by mass copy constructor calls ©?{}(&z.0, x.0)© and ©?{}(&z.1, x.0)©.
+Finally, ©x©, ©y©, and ©z© are destructed, \ie the calls ©^?{}(&x.0)©, ©^?{}(&x.1)©, ©^?{}(&y.0)©, ©^?{}(&y.1)©, ©^?{}(&z.0)©, and ©^?{}(&z.1)©.
+
+It is possible to define constructors and assignment functions for tuple types that provide new semantics, if the existing semantics do not fit the needs of an application.
+For example, the function ©void ?{}([T, U] *, S);© can be defined to allow a tuple variable to be constructed from a value of type ©S©.
+\begin{cfa}
+struct S { int x; double y; };
+void ?{}([int, double] * this, S s) {
+	this->0 = s.x;
+	this->1 = s.y;
+}
+\end{cfa}
+Due to the structure of generated constructors, it is possible to pass a tuple to a generated constructor for a type with a member prefix that matches the type of the tuple.
+For example,
+\begin{cfa}
+struct S { int x; double y; int z };
+[int, double] t;
+S s = t;
+\end{cfa}
+The initialization of ©s© with ©t© works by default because ©t© is flattened into its components, which satisfies the generated field constructor ©?{}(S *, int, double)© to initialize the first two values.
+
+\section{Member-Access Tuple Expression}
+\label{s:MemberAccessTuple}
+It is possible to access multiple fields from a single expression using a \emph{Member-Access Tuple Expression}.
+The result is a single tuple-valued expression whose type is the tuple of the types of the members.
+For example,
+\begin{cfa}
+struct S { int x; double y; char * z; } s;
+s.[x, y, z];
+\end{cfa}
+Here, the type of ©s.[x, y, z]© is ©[int, double, char *]©.
+A member tuple expression has the form ©a.[x, y, z];© where ©a© is an expression with type ©T©, where ©T© supports member access expressions, and ©x, y, z© are all members of ©T© with types ©T$_x$©, ©T$_y$©, and ©T$_z$© respectively.
+Then the type of ©a.[x, y, z]© is ©[T_x, T_y, T_z]©.
+
+Since tuple index expressions are a form of member-access expression, it is possible to use tuple-index expressions in conjunction with member tuple expressions to manually restructure a tuple (\eg, rearrange components, drop components, duplicate components, etc.).
+\begin{cfa}
+[int, int, long, double] x;
+void f(double, long);
+
+f(x.[0, 3]);          // f(x.0, x.3)
+x.[0, 1] = x.[1, 0];  // [x.0, x.1] = [x.1, x.0]
+[long, int, long] y = x.[2, 0, 2];
+\end{cfa}
+
+It is possible for a member tuple expression to contain other member access expressions.
+For example,
+\begin{cfa}
+struct A { double i; int j; };
+struct B { int * k; short l; };
+struct C { int x; A y; B z; } v;
+v.[x, y.[i, j], z.k];
+\end{cfa}
+This expression is equivalent to ©[v.x, [v.y.i, v.y.j], v.z.k]©.
+That is, the aggregate expression is effectively distributed across the tuple, which allows simple and easy access to multiple components in an aggregate, without repetition.
+It is guaranteed that the aggregate expression to the left of the ©.© in a member tuple expression is evaluated exactly once.
+As such, it is safe to use member tuple expressions on the result of a side-effecting function.
+\begin{cfa}
+[int, float, double] f();
+[double, float] x = f().[2, 1];
+\end{cfa}
+
+In \KWC, member tuple expressions are known as \emph{record field tuples} \cite{Till89}.
+Since \CFA permits these tuple-access expressions using structures, unions, and tuples, \emph{member tuple expression} or \emph{field tuple expression} is more appropriate.
+
+It is possible to extend member-access expressions further.
+Currently, a member-access expression whose member is a name requires that the aggregate is a structure or union, while a constant integer member requires the aggregate to be a tuple.
+In the interest of orthogonal design, \CFA could apply some meaning to the remaining combinations as well.
+For example,
+\begin{cfa}
+struct S { int x, y; } s;
+[S, S] z;
+
+s.x;  // access member
+z.0;  // access component
+
+s.1;  // ???
+z.y;  // ???
+\end{cfa}
+One possibility is for ©s.1© to select the second member of ©s©.
+Under this interpretation, it becomes possible to not only access members of a struct by name, but also by position.
+Likewise, it seems natural to open this mechanism to enumerations as well, wherein the left side would be a type, rather than an expression.
+One benefit of this interpretation is familiarity, since it is extremely reminiscent of tuple-index expressions.
+On the other hand, it could be argued that this interpretation is brittle in that changing the order of members or adding new members to a structure becomes a brittle operation.
+This problem is less of a concern with tuples, since modifying a tuple affects only the code that directly uses the tuple, whereas modifying a structure has far reaching consequences for every instance of the structure.
+
+As for ©z.y©, one interpretation is to extend the meaning of member tuple expressions.
+That is, currently the tuple must occur as the member, \ie to the right of the dot.
+Allowing tuples to the left of the dot could distribute the member across the elements of the tuple, in much the same way that member tuple expressions distribute the aggregate across the member tuple.
+In this example, ©z.y© expands to ©[z.0.y, z.1.y]©, allowing what is effectively a very limited compile-time field-sections map operation, where the argument must be a tuple containing only aggregates having a member named ©y©.
+It is questionable how useful this would actually be in practice, since structures often do not have names in common with other structures, and further this could cause maintainability issues in that it encourages programmers to adopt very simple naming conventions to maximize the amount of overlap between different types.
+Perhaps more useful would be to allow arrays on the left side of the dot, which would likewise allow mapping a field access across the entire array, producing an array of the contained fields.
+The immediate problem with this idea is that C arrays do not carry around their size, which would make it impossible to use this extension for anything other than a simple stack allocated array.
+
+Supposing this feature works as described, it would be necessary to specify an ordering for the expansion of member-access expressions versus member-tuple expressions.
+\begin{cfa}
+struct { int x, y; };
+[S, S] z;
+z.[x, y];  // ???
+// => [z.0, z.1].[x, y]
+// => [z.0.x, z.0.y, z.1.x, z.1.y]
+// or
+// => [z.x, z.y]
+// => [[z.0, z.1].x, [z.0, z.1].y]
+// => [z.0.x, z.1.x, z.0.y, z.1.y]
+\end{cfa}
+Depending on exactly how the two tuples are combined, different results can be achieved.
+As such, a specific ordering would need to be imposed to make this feature useful.
+Furthermore, this addition moves a member-tuple expression's meaning from being clear statically to needing resolver support, since the member name needs to be distributed appropriately over each member of the tuple, which could itself be a tuple.
+
+A second possibility is for \CFA to have named tuples, as they exist in Swift and D.
+\begin{cfa}
+typedef [int x, int y] Point2D;
+Point2D p1, p2;
+p1.x + p1.y + p2.x + p2.y;
+p1.0 + p1.1 + p2.0 + p2.1;  // equivalent
+\end{cfa}
+In this simpler interpretation, a tuple type carries with it a list of possibly empty identifiers.
+This approach fits naturally with the named return-value feature, and would likely go a long way towards implementing it.
+
+Ultimately, the first two extensions introduce complexity into the model, with relatively little perceived benefit, and so were dropped from consideration.
+Named tuples are a potentially useful addition to the language, provided they can be parsed with a reasonable syntax.
+
+
+\section{Casting}
+In C, the cast operator is used to explicitly convert between types.
+In \CFA, the cast operator has a secondary use, which is type ascription, since it forces the expression resolution algorithm to choose the lowest cost conversion to the target type.
+That is, a cast can be used to select the type of an expression when it is ambiguous, as in the call to an overloaded function.
+\begin{cfa}
+int f();     // (1)
+double f();  // (2)
+
+f();       // ambiguous - (1),(2) both equally viable
+(int)f();  // choose (2)
+\end{cfa}
+Since casting is a fundamental operation in \CFA, casts need to be given a meaningful interpretation in the context of tuples.
+Taking a look at standard C provides some guidance with respect to the way casts should work with tuples.
+\begin{cfa}[numbers=left]
+int f();
+void g();
+
+(void)f();  // valid, ignore results
+(int)g();   // invalid, void cannot be converted to int
+
+struct A { int x; };
+(struct A)f();  // invalid, int cannot be converted to A
+\end{cfa}
+In C, line 4 is a valid cast, which calls ©f© and discards its result.
+On the other hand, line 5 is invalid, because ©g© does not produce a result, so requesting an ©int© to materialize from nothing is nonsensical.
+Finally, line 8 is also invalid, because in C casts only provide conversion between scalar types \cite[p.~91]{C11}.
+For consistency, this implies that any case wherein the number of components increases as a result of the cast is invalid, while casts that have the same or fewer number of components may be valid.
+
+Formally, a cast to tuple type is valid when $T_n \leq S_m$, where $T_n$ is the number of components in the target type and $S_m$ is the number of components in the source type, and for each $i$ in $[0, n)$, $S_i$ can be cast to $T_i$.
+Excess elements ($S_j$ for all $j$ in $[n, m)$) are evaluated, but their values are discarded so that they are not included in the result expression.
+This discarding naturally follows the way that a cast to void works in C.
+
+For example,
+\begin{cfa}
+	[int, int, int] f();
+	[int, [int, int], int] g();
+
+	([int, double])f();           // (1) valid
+	([int, int, int])g();         // (2) valid
+	([void, [int, int]])g();      // (3) valid
+	([int, int, int, int])g();    // (4) invalid
+	([int, [int, int, int]])g();  // (5) invalid
+\end{cfa}
+
+(1) discards the last element of the return value and converts the second element to type double.
+Since ©int© is effectively a 1-element tuple, (2) discards the second component of the second element of the return value of ©g©.
+If ©g© is free of side effects, this is equivalent to ©[(int)(g().0), (int)(g().1.0), (int)(g().2)]©.
+Since ©void© is effectively a 0-element tuple, (3) discards the first and third return values, which is effectively equivalent to ©[(int)(g().1.0), (int)(g().1.1)]©).
+% will this always hold true? probably, as constructors should give all of the conversion power we need. if casts become function calls, what would they look like? would need a way to specify the target type, which seems awkward. Also, C++ basically only has this because classes are closed to extension, while we don't have that problem (can have floating constructors for any type).
+Note that a cast is not a function call in \CFA, so flattening and structuring conversions do not occur for cast expressions.
+As such, (4) is invalid because the cast target type contains 4 components, while the source type contains only 3.
+Similarly, (5) is invalid because the cast ©([int, int, int])(g().1)© is invalid.
+That is, it is invalid to cast ©[int, int]© to ©[int, int, int]©.
+
+\section{Polymorphism}
+Due to the implicit flattening and structuring conversions involved in argument passing, ©otype© and ©dtype© parameters are restricted to matching only with non-tuple types.
+The integration of polymorphism, type assertions, and monomorphic specialization of tuple-assertions are a primary contribution of this thesis to the design of tuples.
+\begin{cfa}
+forall(otype T, dtype U)
+void f(T x, U * y);
+
+f([5, "hello"]);
+\end{cfa}
+In this example, ©[5, "hello"]© is flattened, so that the argument list appears as ©5, "hello"©.
+The argument matching algorithm binds ©T© to ©int© and ©U© to ©const char©, and calls the function as normal.
+
+Tuples can contain otype and dtype components.
+For example, a plus operator can be written to add two triples of a type together.
+\begin{cfa}
+forall(otype T | { T ?+?(T, T); })
+[T, T, T] ?+?([T, T, T] x, [T, T, T] y) {
+	return [x.0+y.0, x.1+y.1, x.2+y.2];
+}
+[int, int, int] x;
+int i1, i2, i3;
+[i1, i2, i3] = x + ([10, 20, 30]);
+\end{cfa}
+Note that due to the implicit tuple conversions, this function is not restricted to the addition of two triples.
+A call to this plus operator type checks as long as a total of 6 non-tuple arguments are passed after flattening, and all of the arguments have a common type that can bind to ©T©, with a pairwise ©?+?© over ©T©.
+For example, these expressions also succeed and produce the same value.
+\begin{cfa}
+([x.0, x.1]) + ([x.2, 10, 20, 30]);  // x + ([10, 20, 30])
+x.0 + ([x.1, x.2, 10, 20, 30]);      // x + ([10, 20, 30])
+\end{cfa}
+This presents a potential problem if structure is important, as these three expressions look like they should have different meanings.
+Furthermore, these calls can be made ambiguous by introducing seemingly different functions.
+\begin{cfa}
+forall(otype T | { T ?+?(T, T); })
+[T, T, T] ?+?([T, T] x, [T, T, T, T]);
+forall(otype T | { T ?+?(T, T); })
+[T, T, T] ?+?(T x, [T, T, T, T, T]);
+\end{cfa}
+It is also important to note that these calls could be disambiguated if the function return types were different, as they likely would be for a reasonable implementation of ©?+?©, since the return type is used in overload resolution.
+Still, these semantics are a deficiency of the current argument matching algorithm, and depending on the function, differing return values may not always be appropriate.
+These issues could be rectified by applying an appropriate conversion cost to the structuring and flattening conversions, which are currently 0-cost conversions in the expression resolver.
+Care would be needed in this case to ensure that exact matches do not incur such a cost.
+\begin{cfa}
+void f([int, int], int, int);
+
+f([0, 0], 0, 0);    // no cost
+f(0, 0, 0, 0);      // cost for structuring
+f([0, 0,], [0, 0]); // cost for flattening
+f([0, 0, 0], 0);    // cost for flattening and structuring
+\end{cfa}
+
+Until this point, it has been assumed that assertion arguments must match the parameter type exactly, modulo polymorphic specialization (\ie, no implicit conversions are applied to assertion arguments).
+This decision presents a conflict with the flexibility of tuples.
+\subsection{Assertion Inference}
+\begin{cfa}
+int f([int, double], double);
+forall(otype T, otype U | { T f(T, U, U); })
+void g(T, U);
+g(5, 10.21);
+\end{cfa}
+If assertion arguments must match exactly, then the call to ©g© cannot be resolved, since the expected type of ©f© is flat, while the only ©f© in scope requires a tuple type.
+Since tuples are fluid, this requirement reduces the usability of tuples in polymorphic code.
+To ease this pain point, function parameter and return lists are flattened for the purposes of type unification, which allows the previous example to pass expression resolution.
+
+This relaxation is made possible by extending the existing thunk generation scheme, as described by Bilson \cite{Bilson03}.
+Now, whenever a candidate's parameter structure does not exactly match the formal parameter's structure, a thunk is generated to specialize calls to the actual function.
+\begin{cfa}
+int _thunk(int _p0, double _p1, double _p2) {
+	return f([_p0, _p1], _p2);
+}
+\end{cfa}
+Essentially, this provides flattening and structuring conversions to inferred functions, improving the compatibility of tuples and polymorphism.
 
 
@@ -3136,53 +3688,6 @@
 
 \begin{table}[hbt]
-\hfil
-\begin{tabular}[t]{ll}
-%identifier & operation \\ \hline
-©?[?]© & subscripting \impl{?[?]}\\
-©?()© & function call \impl{?()}\\
-©?++© & postfix increment \impl{?++}\\
-©?--© & postfix decrement \impl{?--}\\
-©++?© & prefix increment \impl{++?}\\
-©--?© & prefix decrement \impl{--?}\\
-©*?© & dereference \impl{*?}\\
-©+?© & unary plus \impl{+?}\\
-©-?© & arithmetic negation \impl{-?}\\
-©~?© & bitwise negation \impl{~?}\\
-©!?© & logical complement \impl{"!?}\\
-©?*?© & multiplication \impl{?*?}\\
-©?/?© & division \impl{?/?}\\
-\end{tabular}\hfil
-\begin{tabular}[t]{ll}
-%identifier & operation \\ \hline
-©?%?© & remainder \impl{?%?}\\
-©?+?© & addition \impl{?+?}\\
-©?-?© & subtraction \impl{?-?}\\
-©?<<?© & left shift \impl{?<<?}\\
-©?>>?© & right shift \impl{?>>?}\\
-©?<?© & less than \impl{?<?}\\
-©?<=?© & less than or equal \impl{?<=?}\\
-©?>=?© & greater than or equal \impl{?>=?}\\
-©?>?© & greater than \impl{?>?}\\
-©?==?© & equality \impl{?==?}\\
-©?!=?© & inequality \impl{?"!=?}\\
-©?&?© & bitwise AND \impl{?&?}\\
-\end{tabular}\hfil
-\begin{tabular}[t]{ll}
-%identifier & operation \\ \hline
-©?^?© & exclusive OR \impl{?^?}\\
-©?|?© & inclusive OR \impl{?"|?}\\
-©?=?© & simple assignment \impl{?=?}\\
-©?*=?© & multiplication assignment \impl{?*=?}\\
-©?/=?© & division assignment \impl{?/=?}\\
-©?%=?© & remainder assignment \impl{?%=?}\\
-©?+=?© & addition assignment \impl{?+=?}\\
-©?-=?© & subtraction assignment \impl{?-=?}\\
-©?<<=?© & left-shift assignment \impl{?<<=?}\\
-©?>>=?© & right-shift assignment \impl{?>>=?}\\
-©?&=?© & bitwise AND assignment \impl{?&=?}\\
-©?^=?© & exclusive OR assignment \impl{?^=?}\\
-©?|=?© & inclusive OR assignment \impl{?"|=?}\\
-\end{tabular}
-\hfil
+\centering
+\input{../refrat/operidents}
 \caption{Operator Identifiers}
 \label{opids}
@@ -3231,5 +3736,5 @@
 \section{Auto Type-Inferencing}
 
-Auto type-inferencing occurs in a declaration where a variable's type is inferred from its initialization expression type.
+Auto type-inferencing occurs in a declaration where a variable's type is inferred from its initialization ex\-pression type.
 \begin{quote2}
 \begin{tabular}{@{}l@{\hspace{3em}}ll@{}}
@@ -3260,5 +3765,5 @@
 \begin{itemize}
 \item
-preventing having to determine or write out long generic types,
+preventing having to determine or write long generic types,
 \item
 ensure secondary variables, related to a primary variable, always have the same type.
@@ -3284,6 +3789,6 @@
 There is also the conundrum in type inferencing of when to \emph{\Index{brand}} a type.
 That is, when is the type of the variable more important than the type of its initialization expression.
-For example, if a change is made in an initialization expression, it can cause hundreds or thousands of cascading type changes and/or errors.
-At some point, a programmer wants the type of the variable to remain constant and the expression to be in error when it changes.
+For example, if a change is made in an initialization expression, it can cause significant cascading type changes and/or errors.
+At some point, a variable type needs to remain constant and the expression to be in error when it changes.
 
 Given ©typedef© and ©typeof© in \CFA, and the strong need to use the type of left-hand side in inferencing, auto type-inferencing is not supported at this time.
@@ -3498,86 +4003,4 @@
 	}
 \end{cfa}
-\end{comment}
-
-
-\subsection{Memory Management}
-
-
-\subsubsection{Manual Memory Management}
-
-Using malloc and free to dynamically allocate memory exposes several potential, and common, errors.
-First, malloc breaks type safety because it returns a pointer to void.
-There is no relationship between the type that the returned pointer is cast to, and the amount of memory allocated.
-This problem is solved with a type-safe malloc.
-Do.s type-safe malloc does not take any arguments for size.
-Instead, it infers the type based on the return value, and then allocates space for the inferred type.
-
-\begin{cfa}
-float *f = malloc(); // allocates the size of a float
-
-struct S {
-	int i, j, k;
-};
-
-struct S *s = malloc(); // allocates the size of a struct S
-\end{cfa}
-
-In addition to the improved malloc, \CFA also provides a technique for combining allocation and initialization into one step, using the new function.
-For all constructors defined for a given type (see Operator Overloading), a corresponding call to new can be used to allocate and construct that type.
-
-\begin{cfa}
-type Complex = struct {
-	float real;
-	float imag;
-};
-
-// default constructor
-
-void ?{}(Complex &c) {
-	c.real = 0.0;
-	c.imag = 0.0;
-}
-
-
-
-// 2 parameter constructor
-
-void ?{}(Complex &c, float real, float imag) {
-	c.real = real;
-	c.imag = imag;
-}
-
-
-int main() {
-	Complex c1; // No constructor is called
-	Complex c2{}; // Default constructor called
-	Complex c3{1.0, -1.0}; // 2 parameter constructor is called
-
-	Complex *p1 = malloc(); // allocate
-	Complex *p2 = new(); // allocate + default constructor
-	Complex *p3 = new(0.5, 1.0); // allocate + 2 param constructor
-}
-\end{cfa}
-
-
-\subsubsection{Automatic Memory Management}
-
-\CFA may also support automatic memory management to further improve safety.
-If the compiler can insert all of the code needed to manage dynamically allocated memory (automatic reference counting), then developers can avoid problems with dangling pointers, double frees, memory leaks, etc.
-This feature requires further investigation.
-\CFA will not have a garbage collector, but might use some kind of region-based memory management.
-
-
-\begin{comment}
-\subsection{Unsafe C Constructs}
-
-C programmers are able to access all of the low-level tricks that are sometimes needed for close-to-the-hardware programming.
-Some of these practices however are often error-prone and difficult to read and maintain.
-Since \CFA is designed to be safer than C, such constructs are disallowed in \CFA code.
-If a programmer wants to use one of these unsafe C constructs, the unsafe code must be contained in a C linkage block (see Interoperability), which will be compiled like C code.
-This block means that the user is telling the tools, .I know this is unsafe, but I.m going to do it anyway..
-
-The exact set of unsafe C constructs that will be disallowed in \CFA has not yet been decided, but is sure to include pointer arithmetic, pointer casting, etc.
-Once the full set is decided, the rules will be listed here.
 \end{comment}
 
@@ -3803,173 +4226,4 @@
 \label{f:SimpleTasks}
 \end{figure}
-
-
-\begin{comment}
-\begin{cfa}
-type Adder = task {
-	int *row;
-	int size;
-	int &subtotal;
-}
-\end{cfa}
-
-A task may define a constructor, which will be called upon allocation and run on the caller.s thread.
-A destructor may also be defined, which is called at deallocation (when a dynamic object is deleted or when a local object goes out of scope).
-After a task is allocated and initialized, its thread is spawned implicitly and begins executing in its function call method.
-All tasks must define this function call method, with a void return value and no additional parameters, or the compiler will report an error.
-Below are example functions for the above Adder task, and its usage to sum up a matrix on multiple threads.
-(Note that this example is designed to display the syntax and functionality, not the best method to solve this problem)
-\begin{cfa}
-void ?{}(Adder &a, int r[], int s, int &st) { // constructor
-	a.row = r;
-	a.size = s;
-	a.subtotal = st;
-}
-
-// implicitly spawn thread and begin execution here
-
-void ?()(Adder &a) {
-	int c;
-	subtotal = 0;
-	for (c=0; c<a.size; ++c) {
-	subtotal += row[c];
-	}
-}
-
-int main() {
-	const int rows = 100, cols = 1000000;
-	int matrix[rows][cols];
-	int subtotals[rows];
-	int total = 0;
-	int r;
-
-	{ // create a new scope here for our adders
-	Adder adders[rows];
-	// read in the matrix
-	...
-	for (r=0; r<rows; ++r) {
-	// tasks are initialized on this thread
-	Adders[r] = {matrix[r], cols, subtotals[r]};
-	Adders[r](); // spawn thread and begin execution
-	}
-	} // adders go out of scope; block here until they all finish
-	total += subtotals[r];
-	printf(.total is %d\n., total);
-}
-\end{cfa}
-
-\subsection{Cooperative Scheduling}
-
-Tasks in \CFA are cooperatively scheduled, meaning that a task will not be interrupted by another task, except at specific yield points.
-In Listing 31, there are no yield points, so each task runs to completion with no interruptions.
-Places where a task could yield include waiting for a lock (explicitly or implicitly), waiting for I/O, or waiting for a specific function (or one of a set of functions) to be called.
-This last option is introduced with the yield function. yield is used to indicate that this task should yield its thread until the specified function is called.
-For example, the code below defines a monitor that maintains a generic list.
-When a task tries to pop from the list, but it is empty, the task should yield until another task puts something into the list, with the push function.
-Similarly, when a task tries to push something onto the list, but it is full, it will yield until another task frees some space with the pop function.
-
-\begin{cfa}
-// type T is used as a generic type for all definitions inside
-// the curly brackets
-
-generic(type T) {
-	type Channel = monitor {
-	List(T) list; // list is a simple generic list type
-	};
-
-	T pop(mutex &Channel(T) ch) {
-	if (ch.list.empty()) {
-	// yield until push is called for this channel
-	yield(push);
-	}
-	return ch.list.pop();
-	}
-
-	void push(mutex &Channel(T)ch, T val) {
-	if (ch.list.full()) {
-	// yield until pop is called for this channel
-	yield(pop);
-	}
-	ch.list.push(val);
-	}
-}
-\end{cfa}
-
-A task can also yield indefinitely by calling yield with no arguments.
-This will tell the scheduler to yield this task until it is resumed by some other task.
-A task can resume another task by using its functional call operator.
-The code below shows a simple ping-pong example, where two tasks yield back and forth to each other using these methods.
-
-\begin{cfa}
-type Ping = task {
-	Pong *partner;
-};
-
-void ?{}(Ping &p, Pong *partner = 0) {
-	p.partner = partner;
-}
-
-void ?()(Ping &p) {
-	for(;;) { // loop forever
-	printf(.ping\n.);
-	partner(); // resumes the partner task
-	yield(); // yields this task
-	}
-}
-
-type Pong = task {
-	Ping *partner;
-};
-
-void ?{}(Pong &p, Ping *partner = 0) {
-	p.partner = partner;
-}
-
-void ?()(Pong &p) {
-	for(;;) { // loop forever
-	yield(); // yields this task
-	printf(.pong/n.);
-	partner(); // resumes the partner task
-	}
-}
-
-void main() {
-	Ping ping; // allocate ping
-	Pong pong{ping}; // allocate, initialize, and start pong
-	Ping{pong}; // initialize and start ping
-}
-\end{cfa}
-
-The same functionality can be accomplished by providing functions to be called by the partner task.
-\begin{cfa}
-type Pingpong = task {
-	String msg;
-	Pingpong *partner;
-};
-
-void ?{}(Pingpong &p, String msg, Pingpong *partner = 0) {
-	p.msg = msg;
-	p.partner = partner;
-}
-
-void ?()(Pingpong &p) {
-	for(;;) {
-	yield(go);
-	}
-}
-
-void go(Pingpong &p) {
-	print(.%(p.msg)\n.);
-	go(p.partner);
-}
-
-void main() {
-	Pingpong ping = {.ping.};
-	Pingpong pong = {.pong., ping};
-	ping.partner = pong;
-	go(ping);
-}
-\end{cfa}
-\end{comment}
 
 
@@ -4632,5 +4886,5 @@
 
 
-\section{Comparison with Other Languages}
+\section{Language Comparisons}
 
 \CFA is one of many languages that attempts to improve upon C.
@@ -5367,55 +5621,5 @@
 
 
-\section{\texorpdfstring{\CFA Keywords}{Cforall Keywords}}
-\label{s:CFAKeywords}
-
-\CFA introduces the following new keywords.
-
-\begin{quote2}
-\begin{tabular}{lllll}
-\begin{tabular}{@{}l@{}}
-©_At©			\\
-©catch©			\\
-©catchResume©	\\
-©choose©		\\
-©coroutine©		\\
-\end{tabular}
-&
-\begin{tabular}{@{}l@{}}
-©disable©		\\
-©dtype©			\\
-©enable©		\\
-©fallthrough©	\\
-©fallthru©		\\
-\end{tabular}
-&
-\begin{tabular}{@{}l@{}}
-©finally©		\\
-©forall©		\\
-©ftype©			\\
-©lvalue©		\\
-©monitor©		\\
-\end{tabular}
-&
-\begin{tabular}{@{}l@{}}
-©mutex©			\\
-©one_t©			\\
-©otype©			\\
-©throw©			\\
-©throwResume©	\\
-\end{tabular}
-&
-\begin{tabular}{@{}l@{}}
-©trait©			\\
-©try©			\\
-©ttype©			\\
-©with©			\\
-©zero_t©		\\
-\end{tabular}
-\end{tabular}
-\end{quote2}
-
-
-\section{Incompatible}
+\section{C Incompatibles}
 
 The following incompatibles exist between \CFA and C, and are similar to Annex C for \CC~\cite{C++14}.
@@ -5518,5 +5722,5 @@
 struct X { int i; struct X *next; };
 static struct X a;				§\C{// forward definition}§
-static struct X b = { 0, ®&a® };	§\C{// forward reference, valid in C, invalid in \CFA}§
+static struct X b = { 0, ®&a® };§\C{// forward reference, valid in C, invalid in \CFA}§
 static struct X a = { 1, &b };	§\C{// definition}§
 \end{cfa}
@@ -5533,5 +5737,5 @@
 enum ®Colour® { R, G, B, Y, C, M };
 struct Person {
-	enum ®Colour® { R, G, B };	§\C{// nested type}§
+	enum ®Colour® { R, G, B };	§\C[7cm]{// nested type}§
 	struct Face {				§\C{// nested type}§
 		®Colour® Eyes, Hair;	§\C{// type defined outside (1 level)}§
@@ -5542,6 +5746,6 @@
 };
 ®Colour® c = R;					§\C{// type/enum defined same level}§
-Person®.Colour® pc = Person®.®R;	§\C{// type/enum defined inside}§
-Person®.®Face pretty;			§\C{// type defined inside}§
+Person®.Colour® pc = Person®.®R;§\C{// type/enum defined inside}§
+Person®.®Face pretty;			§\C{// type defined inside}\CRT§
 \end{cfa}
 In C, the name of the nested types belongs to the same scope as the name of the outermost enclosing structure, \ie the nested types are hoisted to the scope of the outer-most type, which is not useful and confusing.
@@ -5572,13 +5776,57 @@
 \item
 \begin{description}
+\item[Change:] remove implicit conversion of ©void *© to or from any ©T *© pointer:
+\begin{cfa}
+void foo() {
+	int * b = malloc( sizeof(int) );	§\C{// implicitly convert void * to int *}§
+	char * c = b;				§\C{// implicitly convert int * to void *, and then void * to char *}§
+}
+\end{cfa}
+\item[Rationale:] increase type safety
+\item[Effect on original feature:] deletion of semantically well-defined feature.
+\item[Difficulty of converting:] requires adding a cast (see \VRef{s:StorageManagement} for better alternatives):
+\begin{cfa}
+	int * b = (int *)malloc( sizeof(int) );
+	char * c = (char *)b;
+\end{cfa}
+\item[How widely used:] Significant.
+Some C translators already give a warning if the cast is not used.
+\end{description}
+
+\item
+\begin{description}
+\item[Change:] Types must be declared in declarations, not in expressions
+In C, a sizeof expression or cast expression may create a new type. For example,
+\begin{cfa}
+p = (void*)(struct x {int i;} *)0;
+\end{cfa}
+declares a new type, struct x .
+\item[Rationale:] This prohibition helps to clarify the location of declarations in the source code.
+\item[Effect on original feature:] Deletion of a semantically welldefined feature.
+\item[Difficulty of converting:] Syntactic transformation.
+\item[How widely used:] Seldom.
+\end{description}
+
+\item
+\begin{description}
 \item[Change:] comma expression is disallowed as subscript
 \item[Rationale:] safety issue to prevent subscripting error for multidimensional arrays: ©x[i,j]© instead of ©x[i][j]©, and this syntactic form then taken by \CFA for new style arrays.
 \item[Effect on original feature:] change to semantics of well-defined feature.
 \item[Difficulty of converting:] semantic transformation of ©x[i,j]© to ©x[(i,j)]©
-\item[How widely used:] seldom.
+\item[How widely used:] Seldom.
 \end{description}
 \end{enumerate}
 
 
+\section{\texorpdfstring{\CFA Keywords}{Cforall Keywords}}
+\label{s:CFAKeywords}
+
+\CFA introduces the following new keywords.
+
+\begin{quote2}
+\input{../refrat/keywords}
+\end{quote2}
+
+
 \section{Standard Headers}
 \label{s:StandardHeaders}
@@ -5586,6 +5834,6 @@
 \Celeven prescribes the following standard header-files~\cite[\S~7.1.2]{C11} and \CFA adds to this list:
 \begin{quote2}
-\begin{tabular}{@{}lllll|l@{}}
-\multicolumn{5}{c|}{C11} & \multicolumn{1}{c}{\CFA}		\\
+\begin{tabular}{@{}llllll|l@{}}
+\multicolumn{6}{c|}{C11} & \multicolumn{1}{c}{\CFA}		\\
 \hline
 \begin{tabular}{@{}l@{}}
@@ -5595,36 +5843,39 @@
 \Indexc{errno.h}		\\
 \Indexc{fenv.h}			\\
-\Indexc[deletekeywords=float]{float.h} \\
 \end{tabular}
 &
 \begin{tabular}{@{}l@{}}
+\Indexc[deletekeywords=float]{float.h} \\
 \Indexc{inttypes.h}		\\
 \Indexc{iso646.h}		\\
 \Indexc{limits.h}		\\
 \Indexc{locale.h}		\\
-\Indexc{math.h}			\\
-\Indexc{setjmp.h}		\\
 \end{tabular}
 &
 \begin{tabular}{@{}l@{}}
+\Indexc{math.h}			\\
+\Indexc{setjmp.h}		\\
 \Indexc{signal.h}		\\
 \Indexc{stdalign.h}		\\
 \Indexc{stdarg.h}		\\
+\end{tabular}
+&
+\begin{tabular}{@{}l@{}}
 \Indexc{stdatomic.h}	\\
 \Indexc{stdbool.h}		\\
 \Indexc{stddef.h}		\\
+\Indexc{stdint.h}		\\
+\Indexc{stdio.h}		\\
 \end{tabular}
 &
 \begin{tabular}{@{}l@{}}
-\Indexc{stdint.h}		\\
-\Indexc{stdio.h}		\\
 \Indexc{stdlib.h}		\\
 \Indexc{stdnoreturn.h}	\\
 \Indexc{string.h}		\\
 \Indexc{tgmath.h}		\\
+\Indexc{threads.h}		\\
 \end{tabular}
 &
 \begin{tabular}{@{}l@{}}
-\Indexc{threads.h}		\\
 \Indexc{time.h}			\\
 \Indexc{uchar.h}		\\
@@ -5635,8 +5886,7 @@
 &
 \begin{tabular}{@{}l@{}}
+\Indexc{gmp.h}			\\
+\Indexc{malloc.h}		\\
 \Indexc{unistd.h}		\\
-\Indexc{gmp.h}			\\
-						\\
-						\\
 						\\
 						\\
@@ -5647,5 +5897,5 @@
 hence, names in these include files are not mangled\index{mangling!name} (see~\VRef{s:Interoperability}).
 All other C header files must be explicitly wrapped in ©extern "C"© to prevent name mangling.
-For \Index*[C++]{\CC{}}, the name-mangling issue is handled implicitly because most C header-files are augmented with checks for preprocessor variable ©__cplusplus©, which adds appropriate ©extern "C"© qualifiers.
+For \Index*[C++]{\CC{}}, the name-mangling issue is often handled internally in many C header-files through checks for preprocessor variable ©__cplusplus©, which adds appropriate ©extern "C"© qualifiers.
 
 
@@ -5657,4 +5907,5 @@
 
 \subsection{Storage Management}
+\label{s:StorageManagement}
 
 The storage-management routines extend their C equivalents by overloading, alternate names, providing shallow type-safety, and removing the need to specify the allocation size for non-array types.
@@ -5870,17 +6121,17 @@
 long double remainder( long double, long double );
 
-[ int, float ] remquo( float, float );§\indexc{remquo}§
-float remquo( float, float, int * );
+float remquo( float, float, int * );§\indexc{remquo}§
+double remquo( double, double, int * );
+long double remquo( long double, long double, int * );
+[ int, float ] remquo( float, float );
 [ int, double ] remquo( double, double );
-double remquo( double, double, int * );
 [ int, long double ] remquo( long double, long double );
-long double remquo( long double, long double, int * );
-
-[ int, float ] div( float, float );						// alternative name for remquo
-float div( float, float, int * );§\indexc{div}§
+
+float div( float, float, int * );§\indexc{div}§	§\C{// alternative name for remquo}§
+double div( double, double, int * );
+long double div( long double, long double, int * );
+[ int, float ] div( float, float );
 [ int, double ] div( double, double );
-double div( double, double, int * );
 [ int, long double ] div( long double, long double );
-long double div( long double, long double, int * );
 
 float fma( float, float, float );§\indexc{fma}§
@@ -5912,7 +6163,7 @@
 double exp2( double );
 long double exp2( long double );
-float _Complex exp2( float _Complex );
-double _Complex exp2( double _Complex );
-long double _Complex exp2( long double _Complex );
+// float _Complex exp2( float _Complex );
+// double _Complex exp2( double _Complex );
+// long double _Complex exp2( long double _Complex );
 
 float expm1( float );§\indexc{expm1}§
@@ -5920,4 +6171,17 @@
 long double expm1( long double );
 
+float pow( float, float );§\indexc{pow}§
+double pow( double, double );
+long double pow( long double, long double );
+float _Complex pow( float _Complex, float _Complex );
+double _Complex pow( double _Complex, double _Complex );
+long double _Complex pow( long double _Complex, long double _Complex );
+\end{cfa}
+
+
+\subsection{Logarithm}
+
+\leavevmode
+\begin{cfa}[aboveskip=0pt,belowskip=0pt]
 float log( float );§\indexc{log}§
 double log( double );
@@ -5930,14 +6194,14 @@
 double log2( double );
 long double log2( long double );
-float _Complex log2( float _Complex );
-double _Complex log2( double _Complex );
-long double _Complex log2( long double _Complex );
+// float _Complex log2( float _Complex );
+// double _Complex log2( double _Complex );
+// long double _Complex log2( long double _Complex );
 
 float log10( float );§\indexc{log10}§
 double log10( double );
 long double log10( long double );
-float _Complex log10( float _Complex );
-double _Complex log10( double _Complex );
-long double _Complex log10( long double _Complex );
+// float _Complex log10( float _Complex );
+// double _Complex log10( double _Complex );
+// long double _Complex log10( long double _Complex );
 
 float log1p( float );§\indexc{log1p}§
@@ -5952,11 +6216,5 @@
 double logb( double );
 long double logb( long double );
-\end{cfa}
-
-
-\subsection{Power}
-
-\leavevmode
-\begin{cfa}[aboveskip=0pt,belowskip=0pt]
+
 float sqrt( float );§\indexc{sqrt}§
 double sqrt( double );
@@ -5973,11 +6231,4 @@
 double hypot( double, double );
 long double hypot( long double, long double );
-
-float pow( float, float );§\indexc{pow}§
-double pow( double, double );
-long double pow( long double, long double );
-float _Complex pow( float _Complex, float _Complex );
-double _Complex pow( double _Complex, double _Complex );
-long double _Complex pow( long double _Complex, long double _Complex );
 \end{cfa}
 
@@ -6033,5 +6284,5 @@
 long double atan2( long double, long double );
 
-float atan( float, float );								// alternative name for atan2
+float atan( float, float );					§\C{// alternative name for atan2}§
 double atan( double, double );§\indexc{atan}§
 long double atan( long double, long double );
@@ -6221,5 +6472,5 @@
 
 \begin{cfa}
-void ?{}( Int * this );					§\C{// constructor}§
+void ?{}( Int * this );					§\C{// constructor/destructor}§
 void ?{}( Int * this, Int init );
 void ?{}( Int * this, zero_t );
@@ -6476,5 +6727,5 @@
 // implementation
 struct Rational {§\indexc{Rational}§
-	long int numerator, denominator;					// invariant: denominator > 0
+	long int numerator, denominator;	§\C{// invariant: denominator > 0}§
 }; // Rational
 
Index: src/ControlStruct/ExceptTranslate.cc
===================================================================
--- src/ControlStruct/ExceptTranslate.cc	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/ControlStruct/ExceptTranslate.cc	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -10,6 +10,6 @@
 // Created On       : Wed Jun 14 16:49:00 2017
 // Last Modified By : Andrew Beach
-// Last Modified On : Tus Jul 18 10:09:00 2017
-// Update Count     : 4
+// Last Modified On : Tus Aug  8 16:54:00 2017
+// Update Count     : 7
 //
 
@@ -21,28 +21,110 @@
 #include "SynTree/Type.h"
 #include "SynTree/Attribute.h"
+#include "SynTree/VarExprReplacer.h"
 
 namespace ControlStruct {
 
-	// This (large) section could probably be moved out of the class
-	// and be static helpers instead.
-
-	// Type(Qualifiers &, false, std::list<Attribute *> &)
-
-	// void (*function)();
-	static FunctionType try_func_t(Type::Qualifiers(), false);
-	// void (*function)(int, exception);
-	static FunctionType catch_func_t(Type::Qualifiers(), false);
-	// int (*function)(exception);
-	static FunctionType match_func_t(Type::Qualifiers(), false);
-	// bool (*function)(exception);
-	static FunctionType handle_func_t(Type::Qualifiers(), false);
-	// void (*function)(__attribute__((unused)) void *);
-	static FunctionType finally_func_t(Type::Qualifiers(), false);
-
-	static void init_func_types() {
-		static bool init_complete = false;
-		if (init_complete) {
-			return;
-		}
+	// Buricratic Helpers (Not having to do with the paritular operation.)
+
+	typedef std::list<CatchStmt*> CatchList;
+
+	void split( CatchList& allHandlers, CatchList& terHandlers,
+				CatchList& resHandlers ) {
+		while ( !allHandlers.empty() ) {
+			CatchStmt * stmt = allHandlers.front();
+			allHandlers.pop_front();
+			if (CatchStmt::Terminate == stmt->get_kind()) {
+				terHandlers.push_back(stmt);
+			} else {
+				resHandlers.push_back(stmt);
+			}
+		}
+	}
+
+	void appendDeclStmt( CompoundStmt * block, Declaration * item ) {
+		block->push_back(new DeclStmt(noLabels, item));
+	}
+
+	Expression * nameOf( DeclarationWithType * decl ) {
+		return new VariableExpr( decl );
+	}
+
+	class ExceptionMutatorCore : public WithGuards {
+		enum Context { NoHandler, TerHandler, ResHandler };
+
+		// Also need to handle goto, break & continue.
+		// They need to be cut off in a ResHandler, until we enter another
+		// loop, switch or the goto stays within the function.
+
+		Context cur_context;
+
+		// The current (innermost) termination handler exception declaration.
+		ObjectDecl * handler_except_decl;
+
+		// The built in types used in translation.
+		StructDecl * except_decl;
+		StructDecl * node_decl;
+		StructDecl * hook_decl;
+
+		// The many helper functions for code/syntree generation.
+		Statement * create_given_throw(
+			const char * throwFunc, ThrowStmt * throwStmt );
+		Statement * create_terminate_throw( ThrowStmt * throwStmt );
+		Statement * create_terminate_rethrow( ThrowStmt * throwStmt );
+		Statement * create_resume_throw( ThrowStmt * throwStmt );
+		Statement * create_resume_rethrow( ThrowStmt * throwStmt );
+		CompoundStmt * take_try_block( TryStmt * tryStmt );
+		FunctionDecl * create_try_wrapper( CompoundStmt * body );
+		FunctionDecl * create_terminate_catch( CatchList &handlers );
+		CompoundStmt * create_single_matcher(
+			DeclarationWithType * except_obj, CatchStmt * modded_handler );
+		FunctionDecl * create_terminate_match( CatchList &handlers );
+		CompoundStmt * create_terminate_caller( FunctionDecl * try_wrapper,
+			FunctionDecl * terminate_catch, FunctionDecl * terminate_match );
+		FunctionDecl * create_resume_handler( CatchList &handlers );
+		CompoundStmt * create_resume_wrapper(
+			Statement * wraps, FunctionDecl * resume_handler );
+		FunctionDecl * create_finally_wrapper( TryStmt * tryStmt );
+		ObjectDecl * create_finally_hook( FunctionDecl * finally_wrapper );
+
+		// Types used in translation, make sure to use clone.
+		// void (*function)();
+		FunctionType try_func_t;
+		// void (*function)(int, exception);
+		FunctionType catch_func_t;
+		// int (*function)(exception);
+		FunctionType match_func_t;
+		// bool (*function)(exception);
+		FunctionType handle_func_t;
+		// void (*function)(__attribute__((unused)) void *);
+		FunctionType finally_func_t;
+
+		StructInstType * create_except_type() {
+			assert( except_decl );
+			return new StructInstType( noQualifiers, except_decl );
+		}
+		void init_func_types();
+
+	public:
+		ExceptionMutatorCore() :
+			cur_context( NoHandler ),
+			handler_except_decl( nullptr ),
+			except_decl( nullptr ), node_decl( nullptr ), hook_decl( nullptr ),
+			try_func_t( noQualifiers, false ),
+			catch_func_t( noQualifiers, false ),
+			match_func_t( noQualifiers, false ),
+			handle_func_t( noQualifiers, false ),
+			finally_func_t( noQualifiers, false )
+		{}
+
+		void premutate( CatchStmt *catchStmt );
+		void premutate( StructDecl *structDecl );
+		Statement * postmutate( ThrowStmt *throwStmt );
+		Statement * postmutate( TryStmt *tryStmt );
+	};
+
+	void ExceptionMutatorCore::init_func_types() {
+		assert( except_decl );
+
 		ObjectDecl index_obj(
 			"__handler_index",
@@ -60,5 +142,5 @@
 			new PointerType(
 				noQualifiers,
-				new BasicType( noQualifiers, BasicType::SignedInt )
+				new StructInstType( noQualifiers, except_decl )
 				),
 			/*init*/ NULL
@@ -69,5 +151,5 @@
 			LinkageSpec::Cforall,
 			/*bitfieldWidth*/ NULL,
-			new BasicType(noQualifiers, BasicType::Bool),
+			new BasicType( noQualifiers, BasicType::Bool ),
 			/*init*/ NULL
 			);
@@ -82,5 +164,5 @@
 					noQualifiers
 					),
-				std::list<Attribute *>{new Attribute("unused")}
+				std::list<Attribute *>{ new Attribute( "unused" ) }
 				),
 			NULL
@@ -94,84 +176,56 @@
 		handle_func_t.get_parameters().push_back( exception_obj.clone() );
 		finally_func_t.get_parameters().push_back( voidptr_obj.clone() );
-
-		init_complete = true;
-	}
-
-	// Buricratic Helpers (Not having to do with the paritular operation.)
-
-	typedef std::list<CatchStmt*> CatchList;
-
-	void split( CatchList& allHandlers, CatchList& terHandlers,
-				CatchList& resHandlers ) {
-		while ( !allHandlers.empty() ) {
-			CatchStmt * stmt = allHandlers.front();
-			allHandlers.pop_front();
-			if (CatchStmt::Terminate == stmt->get_kind()) {
-				terHandlers.push_back(stmt);
-			} else {
-				resHandlers.push_back(stmt);
-			}
-		}
-	}
-
-	template<typename T>
-	void free_all( std::list<T *> &list ) {
-		typename std::list<T *>::iterator it;
-		for ( it = list.begin() ; it != list.end() ; ++it ) {
-			delete *it;
-		}
-		list.clear();
-	}
-
-	void appendDeclStmt( CompoundStmt * block, Declaration * item ) {
-		block->push_back(new DeclStmt(noLabels, item));
-	}
-
-	Expression * nameOf( DeclarationWithType * decl ) {
-		return new VariableExpr( decl );
 	}
 
 	// ThrowStmt Mutation Helpers
 
-	Statement * create_given_throw(
+	Statement * ExceptionMutatorCore::create_given_throw(
 			const char * throwFunc, ThrowStmt * throwStmt ) {
-		// { int NAME = EXPR; throwFunc( &NAME ); }
-		CompoundStmt * result = new CompoundStmt( noLabels );
-		ObjectDecl * local = new ObjectDecl(
-			"__local_exception_copy",
-			Type::StorageClasses(),
-			LinkageSpec::Cforall,
-			NULL,
-			new BasicType( noQualifiers, BasicType::SignedInt ),
-			new SingleInit( throwStmt->get_expr() )
-			);
-		appendDeclStmt( result, local );
+		// `throwFunc`( `throwStmt->get_name` );
 		UntypedExpr * call = new UntypedExpr( new NameExpr( throwFunc ) );
-		call->get_args().push_back( new AddressExpr( nameOf( local ) ) );
-		result->push_back( new ExprStmt( throwStmt->get_labels(), call ) );
+		call->get_args().push_back( throwStmt->get_expr() );
 		throwStmt->set_expr( nullptr );
 		delete throwStmt;
-		return result;
-	}
-
-	Statement * create_terminate_throw( ThrowStmt *throwStmt ) {
-		// { int NAME = EXPR; __throw_terminate( &NAME ); }
+		return new ExprStmt( noLabels, call );
+	}
+
+	Statement * ExceptionMutatorCore::create_terminate_throw(
+			ThrowStmt *throwStmt ) {
+		// __throw_terminate( `throwStmt->get_name()` ); }
 		return create_given_throw( "__cfaehm__throw_terminate", throwStmt );
 	}
-	Statement * create_terminate_rethrow( ThrowStmt *throwStmt ) {
-		// __rethrow_terminate();
+
+	Statement * ExceptionMutatorCore::create_terminate_rethrow(
+			ThrowStmt *throwStmt ) {
+		// { `handler_except_decl` = NULL; __rethrow_terminate(); }
 		assert( nullptr == throwStmt->get_expr() );
-		Statement * result = new ExprStmt(
-			throwStmt->get_labels(),
+		assert( handler_except_decl );
+
+		CompoundStmt * result = new CompoundStmt( throwStmt->get_labels() );
+		result->push_back( new ExprStmt( noLabels, UntypedExpr::createAssign(
+			nameOf( handler_except_decl ),
+			new ConstantExpr( Constant::null(
+				new PointerType(
+					noQualifiers,
+					handler_except_decl->get_type()->clone()
+					)
+				) )
+			) ) );
+		result->push_back( new ExprStmt(
+			noLabels,
 			new UntypedExpr( new NameExpr( "__cfaehm__rethrow_terminate" ) )
-			);
+			) );
 		delete throwStmt;
 		return result;
 	}
-	Statement * create_resume_throw( ThrowStmt *throwStmt ) {
-		// __throw_resume( EXPR );
+
+	Statement * ExceptionMutatorCore::create_resume_throw(
+			ThrowStmt *throwStmt ) {
+		// __throw_resume( `throwStmt->get_name` );
 		return create_given_throw( "__cfaehm__throw_resume", throwStmt );
 	}
-	Statement * create_resume_rethrow( ThrowStmt *throwStmt ) {
+
+	Statement * ExceptionMutatorCore::create_resume_rethrow(
+			ThrowStmt *throwStmt ) {
 		// return false;
 		Statement * result = new ReturnStmt(
@@ -185,10 +239,12 @@
 	// TryStmt Mutation Helpers
 
-	CompoundStmt * take_try_block( TryStmt *tryStmt ) {
+	CompoundStmt * ExceptionMutatorCore::take_try_block( TryStmt *tryStmt ) {
 		CompoundStmt * block = tryStmt->get_block();
 		tryStmt->set_block( nullptr );
 		return block;
 	}
-	FunctionDecl * create_try_wrapper( CompoundStmt *body ) {
+
+	FunctionDecl * ExceptionMutatorCore::create_try_wrapper(
+			CompoundStmt *body ) {
 
 		return new FunctionDecl( "try", Type::StorageClasses(),
@@ -196,10 +252,11 @@
 	}
 
-	FunctionDecl * create_terminate_catch( CatchList &handlers ) {
+	FunctionDecl * ExceptionMutatorCore::create_terminate_catch(
+			CatchList &handlers ) {
 		std::list<CaseStmt *> handler_wrappers;
 
 		FunctionType *func_type = catch_func_t.clone();
 		DeclarationWithType * index_obj = func_type->get_parameters().front();
-	//	DeclarationWithType * except_obj = func_type->get_parameters().back();
+		DeclarationWithType * except_obj = func_type->get_parameters().back();
 
 		// Index 1..{number of handlers}
@@ -210,15 +267,44 @@
 			CatchStmt * handler = *it;
 
-			// INTEGERconstant Version
 			// case `index`:
 			// {
-			//     `handler.body`
+			//     `handler.decl` = { (virtual `decl.type`)`except` };
+			//     `handler.body`;
 			// }
 			// return;
-			std::list<Statement *> caseBody;
-			caseBody.push_back( handler->get_body() );
+			CompoundStmt * block = new CompoundStmt( noLabels );
+
+			// Just copy the exception value. (Post Validation)
+			ObjectDecl * handler_decl =
+				static_cast<ObjectDecl *>( handler->get_decl() );
+			ObjectDecl * local_except = handler_decl->clone();
+			local_except->set_init(
+				new ListInit({ new SingleInit(
+					new VirtualCastExpr( nameOf( except_obj ),
+						local_except->get_type()
+						)
+					) })
+				);
+			block->push_back( new DeclStmt( noLabels, local_except ) );
+
+			// Add the cleanup attribute.
+			local_except->get_attributes().push_back( new Attribute(
+				"cleanup",
+				{ new NameExpr( "__cfaehm__cleanup_terminate" ) }
+				) );
+
+			// Update variables in the body to point to this local copy.
+			{
+				VarExprReplacer::DeclMap mapping;
+				mapping[ handler_decl ] = local_except;
+				VarExprReplacer mapper( mapping );
+				handler->get_body()->accept( mapper );
+			}
+
+			block->push_back( handler->get_body() );
 			handler->set_body( nullptr );
-			caseBody.push_back( new ReturnStmt( noLabels, nullptr ) );
-
+
+			std::list<Statement *> caseBody
+					{ block, new ReturnStmt( noLabels, nullptr ) };
 			handler_wrappers.push_back( new CaseStmt(
 				noLabels,
@@ -249,32 +335,32 @@
 	// Create a single check from a moddified handler.
 	// except_obj is referenced, modded_handler will be freed.
-	CompoundStmt *create_single_matcher(
+	CompoundStmt * ExceptionMutatorCore::create_single_matcher(
 			DeclarationWithType * except_obj, CatchStmt * modded_handler ) {
+		// {
+		//     `modded_handler.decl`
+		//     if ( `decl.name = (virtual `decl.type`)`except`
+		//             [&& `modded_handler.cond`] ) {
+		//         `modded_handler.body`
+		//     }
+		// }
+
 		CompoundStmt * block = new CompoundStmt( noLabels );
 
-		// INTEGERconstant Version
-		assert( nullptr == modded_handler->get_decl() );
-		ConstantExpr * number =
-			dynamic_cast<ConstantExpr*>( modded_handler->get_cond() );
-		assert( number );
-		modded_handler->set_cond( nullptr );
-
-		Expression * cond;
-		{
-			std::list<Expression *> args;
-			args.push_back( number );
-
-			std::list<Expression *> rhs_args;
-			rhs_args.push_back( nameOf( except_obj ) );
-			Expression * rhs = new UntypedExpr(
-				new NameExpr( "*?" ), rhs_args );
-			args.push_back( rhs );
-
-			cond = new UntypedExpr( new NameExpr( "?==?" /*???*/), args );
-		}
-
+		// Local Declaration
+		ObjectDecl * local_except =
+			dynamic_cast<ObjectDecl *>( modded_handler->get_decl() );
+		assert( local_except );
+		block->push_back( new DeclStmt( noLabels, local_except ) );
+
+		// Check for type match.
+		Expression * cond = UntypedExpr::createAssign( nameOf( local_except ),
+			new VirtualCastExpr( nameOf( except_obj ),
+				local_except->get_type()->clone() ) );
+
+		// Add the check on the conditional if it is provided.
 		if ( modded_handler->get_cond() ) {
 			cond = new LogicalExpr( cond, modded_handler->get_cond() );
 		}
+		// Construct the match condition.
 		block->push_back( new IfStmt( noLabels,
 			cond, modded_handler->get_body(), nullptr ) );
@@ -287,5 +373,10 @@
 	}
 
-	FunctionDecl * create_terminate_match( CatchList &handlers ) {
+	FunctionDecl * ExceptionMutatorCore::create_terminate_match(
+			CatchList &handlers ) {
+		// int match(exception * except) {
+		//     HANDLER WRAPPERS { return `index`; }
+		// }
+
 		CompoundStmt * body = new CompoundStmt( noLabels );
 
@@ -319,8 +410,9 @@
 	}
 
-	CompoundStmt * create_terminate_caller(
+	CompoundStmt * ExceptionMutatorCore::create_terminate_caller(
 			FunctionDecl * try_wrapper,
 			FunctionDecl * terminate_catch,
-			FunctionDecl * terminate_match) {
+			FunctionDecl * terminate_match ) {
+		// { __cfaehm__try_terminate(`try`, `catch`, `match`); }
 
 		UntypedExpr * caller = new UntypedExpr( new NameExpr(
@@ -336,5 +428,9 @@
 	}
 
-	FunctionDecl * create_resume_handler( CatchList &handlers ) {
+	FunctionDecl * ExceptionMutatorCore::create_resume_handler(
+			CatchList &handlers ) {
+		// bool handle(exception * except) {
+		//     HANDLER WRAPPERS { `hander->body`; return true; }
+		// }
 		CompoundStmt * body = new CompoundStmt( noLabels );
 
@@ -369,6 +465,5 @@
 	}
 
-	CompoundStmt * create_resume_wrapper(
-			StructDecl * node_decl,
+	CompoundStmt * ExceptionMutatorCore::create_resume_wrapper(
 			Statement * wraps,
 			FunctionDecl * resume_handler ) {
@@ -414,5 +509,7 @@
 	}
 
-	FunctionDecl * create_finally_wrapper( TryStmt * tryStmt ) {
+	FunctionDecl * ExceptionMutatorCore::create_finally_wrapper(
+			TryStmt * tryStmt ) {
+		// void finally() { <finally code> }
 		FinallyStmt * finally = tryStmt->get_finally();
 		CompoundStmt * body = finally->get_block();
@@ -425,6 +522,6 @@
 	}
 
-	ObjectDecl * create_finally_hook(
-			StructDecl * hook_decl, FunctionDecl * finally_wrapper ) {
+	ObjectDecl * ExceptionMutatorCore::create_finally_hook(
+			FunctionDecl * finally_wrapper ) {
 		// struct __cfaehm__cleanup_hook __finally_hook
 		//   	__attribute__((cleanup( finally_wrapper )));
@@ -452,35 +549,50 @@
 	}
 
-
-	class ExceptionMutatorCore : public WithGuards {
-		enum Context { NoHandler, TerHandler, ResHandler };
-
-		// Also need to handle goto, break & continue.
-		// They need to be cut off in a ResHandler, until we enter another
-		// loop, switch or the goto stays within the function.
-
-		Context cur_context;
-
-		// We might not need this, but a unique base for each try block's
-		// generated functions might be nice.
-		//std::string curFunctionName;
-		//unsigned int try_count = 0;
-
-		StructDecl *node_decl;
-		StructDecl *hook_decl;
-
-	public:
-		ExceptionMutatorCore() :
-			cur_context(NoHandler),
-			node_decl(nullptr), hook_decl(nullptr)
-		{}
-
-		void premutate( CatchStmt *catchStmt );
-		void premutate( StructDecl *structDecl );
-		Statement * postmutate( ThrowStmt *throwStmt );
-		Statement * postmutate( TryStmt *tryStmt );
-	};
+	// Visiting/Mutating Functions
+	void ExceptionMutatorCore::premutate( CatchStmt *catchStmt ) {
+		// Validate the Statement's form.
+		ObjectDecl * decl =
+			dynamic_cast<ObjectDecl *>( catchStmt->get_decl() );
+		if ( decl && true /* check decl->get_type() */ ) {
+			// Pass.
+		} else if ( CatchStmt::Terminate == catchStmt->get_kind() ) {
+			throw SemanticError("catch must have exception type");
+		} else {
+			throw SemanticError("catchResume must have exception type");
+		}
+
+		// Track the handler context.
+		GuardValue( cur_context );
+		if ( CatchStmt::Terminate == catchStmt->get_kind() ) {
+			cur_context = TerHandler;
+
+			GuardValue( handler_except_decl );
+			handler_except_decl = decl;
+		} else {
+			cur_context = ResHandler;
+		}
+	}
+
+	void ExceptionMutatorCore::premutate( StructDecl *structDecl ) {
+		if ( !structDecl->has_body() ) {
+			// Skip children?
+			return;
+		} else if ( structDecl->get_name() == "__cfaehm__base_exception_t" ) {
+			assert( nullptr == except_decl );
+			except_decl = structDecl;
+			init_func_types();
+		} else if ( structDecl->get_name() == "__cfaehm__try_resume_node" ) {
+			assert( nullptr == node_decl );
+			node_decl = structDecl;
+		} else if ( structDecl->get_name() == "__cfaehm__cleanup_hook" ) {
+			assert( nullptr == hook_decl );
+			hook_decl = structDecl;
+		}
+		// Later we might get the exception type as well.
+	}
 
 	Statement * ExceptionMutatorCore::postmutate( ThrowStmt *throwStmt ) {
+		assert( except_decl );
+
 		// Ignoring throwStmt->get_target() for now.
 		if ( ThrowStmt::Terminate == throwStmt->get_kind() ) {
@@ -510,4 +622,5 @@
 
 	Statement * ExceptionMutatorCore::postmutate( TryStmt *tryStmt ) {
+		assert( except_decl );
 		assert( node_decl );
 		assert( hook_decl );
@@ -524,6 +637,5 @@
 			appendDeclStmt( block, finally_block );
 			// Create and add the finally cleanup hook.
-			appendDeclStmt( block,
-				create_finally_hook( hook_decl, finally_block ) );
+			appendDeclStmt( block, create_finally_hook( finally_block ) );
 		}
 
@@ -539,5 +651,5 @@
 			appendDeclStmt( block, resume_handler );
 			// Prepare hooks
-			inner = create_resume_wrapper( node_decl, inner, resume_handler );
+			inner = create_resume_wrapper( inner, resume_handler );
 		}
 
@@ -560,36 +672,8 @@
 		block->push_back( inner );
 
-		//free_all( termination_handlers );
-		//free_all( resumption_handlers );
-
 		return block;
 	}
 
-	void ExceptionMutatorCore::premutate( CatchStmt *catchStmt ) {
-		GuardValue( cur_context );
-		if ( CatchStmt::Terminate == catchStmt->get_kind() ) {
-			cur_context = TerHandler;
-		} else {
-			cur_context = ResHandler;
-		}
-	}
-
-	void ExceptionMutatorCore::premutate( StructDecl *structDecl ) {
-		if ( !structDecl->has_body() ) {
-			// Skip children?
-			return;
-		} else if ( structDecl->get_name() == "__cfaehm__try_resume_node" ) {
-			assert( nullptr == node_decl );
-			node_decl = structDecl;
-		} else if ( structDecl->get_name() == "__cfaehm__cleanup_hook" ) {
-			assert( nullptr == hook_decl );
-			hook_decl = structDecl;
-		}
-		// Later we might get the exception type as well.
-	}
-
 	void translateEHM( std::list< Declaration *> & translationUnit ) {
-		init_func_types();
-
 		PassVisitor<ExceptionMutatorCore> translator;
 		mutateAll( translationUnit, translator );
Index: src/GenPoly/Box.cc
===================================================================
--- src/GenPoly/Box.cc	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/GenPoly/Box.cc	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -27,6 +27,7 @@
 #include "Box.h"
 #include "DeclMutator.h"
+#include "Lvalue.h"
+#include "FindFunction.h"
 #include "PolyMutator.h"
-#include "FindFunction.h"
 #include "ScopedSet.h"
 #include "ScrubTyVars.h"
@@ -755,17 +756,15 @@
 
 		void Pass1::boxParam( Type *param, Expression *&arg, const TyVarMap &exprTyVars ) {
-			assert( arg->has_result() );
+			assertf( arg->has_result(), "arg does not have result: %s", toString( arg ).c_str() );
 			if ( isPolyType( param, exprTyVars ) ) {
-				if ( isPolyType( arg->get_result() ) ) {
+				Type * newType = arg->get_result()->clone();
+				if ( env ) env->apply( newType );
+				std::auto_ptr<Type> manager( newType );
+				if ( isPolyType( newType ) ) {
 					// if the argument's type is polymorphic, we don't need to box again!
 					return;
 				} else if ( arg->get_result()->get_lvalue() ) {
-					// VariableExpr and MemberExpr are lvalues; need to check this isn't coming from the second arg of a comma expression though (not an lvalue)
-					// xxx - need to test that this code is still reachable
-					if ( CommaExpr *commaArg = dynamic_cast< CommaExpr* >( arg ) ) {
-						commaArg->set_arg2( new AddressExpr( commaArg->get_arg2() ) );
-					} else {
-						arg = new AddressExpr( arg );
-					}
+					// argument expression may be CFA lvalue, but not C lvalue -- apply generalizedLvalue transformations.
+					arg =  generalizedLvalue( new AddressExpr( arg ) );
 					if ( ! ResolvExpr::typesCompatible( param, arg->get_result(), SymTab::Indexer() ) ) {
 						// silence warnings by casting boxed parameters when the actual type does not match up with the formal type.
@@ -1879,5 +1878,5 @@
 			return structDecl;
 		}
-		
+
 		Declaration *Pass3::mutate( UnionDecl *unionDecl ) {
 			stripGenericMembers( unionDecl );
Index: src/GenPoly/Lvalue.cc
===================================================================
--- src/GenPoly/Lvalue.cc	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/GenPoly/Lvalue.cc	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -27,6 +27,9 @@
 #include "SynTree/Mutator.h"
 #include "SymTab/Indexer.h"
+
 #include "ResolvExpr/Resolver.h"
+#include "ResolvExpr/TypeEnvironment.h"
 #include "ResolvExpr/typeops.h"
+#include "ResolvExpr/Unify.h"
 
 #include "Common/UniqueName.h"
@@ -60,5 +63,9 @@
 			typedef Mutator Parent;
 
+			virtual Expression * mutate( MemberExpr * memExpr );
 			virtual Expression * mutate( AddressExpr * addressExpr );
+
+			template<typename Func>
+			Expression * applyTransformation( Expression * expr, Expression * arg, Func mkExpr );
 		};
 	} // namespace
@@ -71,4 +78,9 @@
 		acceptAll( translationUnit, p2 );
 		mutateAll( translationUnit, genLval );
+	}
+
+	Expression * generalizedLvalue( Expression * expr ) {
+		GeneralizedLvalue genLval;
+		return expr->acceptMutator( genLval );
 	}
 
@@ -163,19 +175,44 @@
 		}
 
-		Expression * GeneralizedLvalue::mutate( AddressExpr * addrExpr ) {
-			addrExpr = safe_dynamic_cast< AddressExpr * >( Parent::mutate( addrExpr ) );
-			if ( CommaExpr * commaExpr = dynamic_cast< CommaExpr * >( addrExpr->get_arg() ) ) {
+		template<typename Func>
+		Expression * GeneralizedLvalue::applyTransformation( Expression * expr, Expression * arg, Func mkExpr ) {
+			if ( CommaExpr * commaExpr = dynamic_cast< CommaExpr * >( arg ) ) {
 				Expression * arg1 = commaExpr->get_arg1()->clone();
 				Expression * arg2 = commaExpr->get_arg2()->clone();
-				delete addrExpr;
-				return new CommaExpr( arg1, new AddressExpr( arg2 ) );
-			} else if ( ConditionalExpr * condExpr = dynamic_cast< ConditionalExpr * >( addrExpr->get_arg() ) ) {
+				Expression * ret = new CommaExpr( arg1, mkExpr( arg2 ) );
+				ret->set_env( expr->get_env() );
+				expr->set_env( nullptr );
+				delete expr;
+				return ret->acceptMutator( *this );
+			} else if ( ConditionalExpr * condExpr = dynamic_cast< ConditionalExpr * >( arg ) ) {
 				Expression * arg1 = condExpr->get_arg1()->clone();
 				Expression * arg2 = condExpr->get_arg2()->clone();
 				Expression * arg3 = condExpr->get_arg3()->clone();
-				delete addrExpr;
-				return new ConditionalExpr( arg1, new AddressExpr( arg2 ), new AddressExpr( arg3 ) );
+				ConditionalExpr * ret = new ConditionalExpr( arg1, mkExpr( arg2 ), mkExpr( arg3 ) );
+				ret->set_env( expr->get_env() );
+				expr->set_env( nullptr );
+				delete expr;
+
+				// conditional expr type may not be either of the argument types, need to unify
+				using namespace ResolvExpr;
+				Type* commonType = nullptr;
+				TypeEnvironment newEnv;
+				AssertionSet needAssertions, haveAssertions;
+				OpenVarSet openVars;
+				unify( ret->get_arg2()->get_result(), ret->get_arg3()->get_result(), newEnv, needAssertions, haveAssertions, openVars, SymTab::Indexer(), commonType );
+				ret->set_result( commonType ? commonType : ret->get_arg2()->get_result()->clone() );
+				return ret->acceptMutator( *this );
 			}
-			return addrExpr;
+			return expr;
+		}
+
+		Expression * GeneralizedLvalue::mutate( MemberExpr * memExpr ) {
+			Parent::mutate( memExpr );
+			return applyTransformation( memExpr, memExpr->get_aggregate(), [=]( Expression * aggr ) { return new MemberExpr( memExpr->get_member(), aggr ); } );
+		}
+
+		Expression * GeneralizedLvalue::mutate( AddressExpr * addrExpr ) {
+			addrExpr = safe_dynamic_cast< AddressExpr * >( Parent::mutate( addrExpr ) );
+			return applyTransformation( addrExpr, addrExpr->get_arg(), []( Expression * arg ) { return new AddressExpr( arg ); } );
 		}
 	} // namespace
Index: src/GenPoly/Lvalue.h
===================================================================
--- src/GenPoly/Lvalue.h	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/GenPoly/Lvalue.h	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -5,5 +5,5 @@
 // file "LICENCE" distributed with Cforall.
 //
-// Lvalue.h -- 
+// Lvalue.h --
 //
 // Author           : Richard C. Bilson
@@ -23,4 +23,7 @@
 	/// replaces return type of `lvalue T` with `T*`, along with appropriate address-of and dereference operators
 	void convertLvalue( std::list< Declaration* >& translationUnit );
+
+	/// applies transformations that allow GCC to accept more complicated lvalue expressions, e.g. &(a, b)
+	Expression * generalizedLvalue( Expression * expr );
 } // namespace GenPoly
 
Index: src/Makefile.am
===================================================================
--- src/Makefile.am	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/Makefile.am	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -43,5 +43,5 @@
 cfa_cpplib_PROGRAMS = driver/cfa-cpp
 driver_cfa_cpp_SOURCES = ${SRC}
-driver_cfa_cpp_LDADD = ${LEXLIB} -ldl			# yywrap
+driver_cfa_cpp_LDADD = -ldl			# yywrap
 driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -Wextra -DDEBUG_ALL -I${abs_top_srcdir}/src/include -DYY_NO_INPUT -O2 -g -std=c++14
 driver_cfa_cpp_LDFLAGS = -Xlinker -export-dynamic
Index: src/Makefile.in
===================================================================
--- src/Makefile.in	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/Makefile.in	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -262,6 +262,5 @@
 am_driver_cfa_cpp_OBJECTS = $(am__objects_1)
 driver_cfa_cpp_OBJECTS = $(am_driver_cfa_cpp_OBJECTS)
-am__DEPENDENCIES_1 =
-driver_cfa_cpp_DEPENDENCIES = $(am__DEPENDENCIES_1)
+driver_cfa_cpp_DEPENDENCIES =
 driver_cfa_cpp_LINK = $(CXXLD) $(driver_cfa_cpp_CXXFLAGS) $(CXXFLAGS) \
 	$(driver_cfa_cpp_LDFLAGS) $(LDFLAGS) -o $@
@@ -548,5 +547,5 @@
 cfa_cpplibdir = ${CFA_LIBDIR}
 driver_cfa_cpp_SOURCES = ${SRC}
-driver_cfa_cpp_LDADD = ${LEXLIB} -ldl			# yywrap
+driver_cfa_cpp_LDADD = -ldl			# yywrap
 driver_cfa_cpp_CXXFLAGS = -Wno-deprecated -Wall -Wextra -DDEBUG_ALL -I${abs_top_srcdir}/src/include -DYY_NO_INPUT -O2 -g -std=c++14
 driver_cfa_cpp_LDFLAGS = -Xlinker -export-dynamic
Index: src/Parser/ExpressionNode.cc
===================================================================
--- src/Parser/ExpressionNode.cc	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/Parser/ExpressionNode.cc	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -10,13 +10,9 @@
 // Created On       : Sat May 16 13:17:07 2015
 // Last Modified By : Andrew Beach
-// Last Modified On : Tus Jul 25 10:11:00 2017
-// Update Count     : 551
-//
-
-#include <cassert>
-#include <cctype>
-#include <climits>
-#include <cstdio>
-#include <algorithm>
+// Last Modified On : Wed Aug  2 11:12:00 2017
+// Update Count     : 568
+//
+
+#include <climits>										// access INT_MAX, UINT_MAX, LONG_MAX, ULONG_MAX, LLONG_MAX
 #include <sstream>
 
@@ -26,7 +22,5 @@
 #include "SynTree/Expression.h"
 #include "SynTree/Declaration.h"
-#include "Common/UnimplementedError.h"
 #include "parserutility.h"
-#include "Common/utility.h"
 
 using namespace std;
@@ -46,5 +40,5 @@
 // type.
 
-Type::Qualifiers noQualifiers;				// no qualifiers on constants
+extern const Type::Qualifiers noQualifiers;		// no qualifiers on constants
 
 static inline bool checkU( char c ) { return c == 'u' || c == 'U'; }
@@ -55,5 +49,5 @@
 static inline bool checkX( char c ) { return c == 'x' || c == 'X'; }
 
-Expression *build_constantInteger( const std::string & str ) {
+Expression * build_constantInteger( const std::string & str ) {
 	static const BasicType::Kind kind[2][3] = {
 		{ BasicType::SignedInt, BasicType::LongSignedInt, BasicType::LongLongSignedInt },
@@ -62,7 +56,18 @@
 	bool dec = true, Unsigned = false;					// decimal, unsigned constant
 	int size;											// 0 => int, 1 => long, 2 => long long
-	unsigned long long int v;								// converted integral value
+	unsigned long long int v;							// converted integral value
 	size_t last = str.length() - 1;						// last character of constant
-
+	Expression * ret;
+
+	// special constants
+	if ( str == "0" ) {
+		ret = new ConstantExpr( Constant( (Type *)new ZeroType( noQualifiers ), str, (unsigned long long int)0 ) );
+		goto CLEANUP;
+	} // if
+	if ( str == "1" ) {
+		ret = new ConstantExpr( Constant( (Type *)new OneType( noQualifiers ), str, (unsigned long long int)1 ) );
+		goto CLEANUP;
+	} // if
+	
 	if ( str[0] == '0' ) {								// octal/hex constant ?
 		dec = false;
@@ -118,10 +123,11 @@
 	} // if
 
-	Expression * ret = new ConstantExpr( Constant( new BasicType( noQualifiers, kind[Unsigned][size] ), str, v ) );
+	ret = new ConstantExpr( Constant( new BasicType( noQualifiers, kind[Unsigned][size] ), str, v ) );
+  CLEANUP:
 	delete &str;										// created by lex
 	return ret;
 } // build_constantInteger
 
-Expression *build_constantFloat( const std::string & str ) {
+Expression * build_constantFloat( const std::string & str ) {
 	static const BasicType::Kind kind[2][3] = {
 		{ BasicType::Float, BasicType::Double, BasicType::LongDouble },
@@ -158,5 +164,5 @@
 } // build_constantFloat
 
-Expression *build_constantChar( const std::string & str ) {
+Expression * build_constantChar( const std::string & str ) {
 	Expression * ret = new ConstantExpr( Constant( new BasicType( noQualifiers, BasicType::Char ), str, (unsigned long long int)(unsigned char)str[1] ) );
 	delete &str;										// created by lex
@@ -164,21 +170,13 @@
 } // build_constantChar
 
-ConstantExpr *build_constantStr( const std::string & str ) {
+ConstantExpr * build_constantStr( const std::string & str ) {
 	// string should probably be a primitive type
-	ArrayType *at = new ArrayType( noQualifiers, new BasicType( Type::Qualifiers( Type::Const ), BasicType::Char ),
-								   new ConstantExpr( Constant::from_ulong( str.size() + 1 - 2 ) ),  // +1 for '\0' and -2 for '"'
+	ArrayType * at = new ArrayType( noQualifiers, new BasicType( Type::Qualifiers( Type::Const ), BasicType::Char ),
+								   new ConstantExpr( Constant::from_ulong( str.size() + 1 - 2 ) ), // +1 for '\0' and -2 for '"'
 								   false, false );
-	// constant 0 is ignored for pure string value
-	ConstantExpr * ret = new ConstantExpr( Constant( at, str, (unsigned long long int)0 ) );
+	ConstantExpr * ret = new ConstantExpr( Constant( at, str, (unsigned long long int)0 ) ); // constant 0 is ignored for pure string value
 	delete &str;										// created by lex
 	return ret;
 } // build_constantStr
-
-Expression *build_constantZeroOne( const std::string & str ) {
-	Expression * ret = new ConstantExpr( Constant( str == "0" ? (Type *)new ZeroType( noQualifiers ) : (Type*)new OneType( noQualifiers ), str,
-												   str == "0" ? (unsigned long long int)0 : (unsigned long long int)1 ) );
-	delete &str;										// created by lex
-	return ret;
-} // build_constantChar
 
 Expression * build_field_name_FLOATINGconstant( const std::string & str ) {
@@ -209,6 +207,4 @@
 } // build_field_name_fraction_constants
 
-
-
 Expression * build_field_name_REALFRACTIONconstant( const std::string & str ) {
 	if ( str.find_first_not_of( "0123456789", 1 ) != string::npos ) throw SemanticError( "invalid tuple index " + str );
@@ -225,12 +221,12 @@
 } // build_field_name_REALDECIMALconstant
 
-NameExpr * build_varref( const string *name ) {
-	NameExpr *expr = new NameExpr( *name, nullptr );
+NameExpr * build_varref( const string * name ) {
+	NameExpr * expr = new NameExpr( *name, nullptr );
 	delete name;
 	return expr;
-}
-
-// Must harmonize with OperKinds.
-static const char *OperName[] = {
+} // build_varref
+
+
+static const char * OperName[] = {						// must harmonize with OperKinds
 	// diadic
 	"SizeOf", "AlignOf", "OffsetOf", "?+?", "?-?", "?\\?", "?*?", "?/?", "?%?", "||", "&&",
@@ -240,8 +236,8 @@
 	// monadic
 	"+?", "-?", "AddressOf", "*?", "!?", "~?", "++?", "?++", "--?", "?--", "&&"
-};
-
-Expression *build_cast( DeclarationNode *decl_node, ExpressionNode *expr_node ) {
-	Type *targetType = maybeMoveBuildType( decl_node );
+}; // OperName
+
+Expression * build_cast( DeclarationNode * decl_node, ExpressionNode * expr_node ) {
+	Type * targetType = maybeMoveBuildType( decl_node );
 	if ( dynamic_cast< VoidType * >( targetType ) ) {
 		delete targetType;
@@ -250,117 +246,126 @@
 		return new CastExpr( maybeMoveBuild< Expression >(expr_node), targetType );
 	} // if
-}
-
-
-Expression *build_virtual_cast( DeclarationNode *decl_node, ExpressionNode *expr_node ) {
-	Type *targetType = maybeMoveBuildType( decl_node );
-	Expression *castArg = maybeMoveBuild< Expression >( expr_node );
+} // build_cast
+
+Expression * build_virtual_cast( DeclarationNode * decl_node, ExpressionNode * expr_node ) {
+	Type * targetType = maybeMoveBuildType( decl_node );
+	Expression * castArg = maybeMoveBuild< Expression >( expr_node );
 	return new VirtualCastExpr( castArg, targetType );
-}
-
-Expression *build_fieldSel( ExpressionNode *expr_node, Expression *member ) {
-	UntypedMemberExpr *ret = new UntypedMemberExpr( member, maybeMoveBuild< Expression >(expr_node) );
-	return ret;
-}
-
-Expression *build_pfieldSel( ExpressionNode *expr_node, Expression *member ) {
-	UntypedExpr *deref = new UntypedExpr( new NameExpr( "*?" ) );
+} // build_virtual_cast
+
+Expression * build_fieldSel( ExpressionNode * expr_node, Expression * member ) {
+	UntypedMemberExpr * ret = new UntypedMemberExpr( member, maybeMoveBuild< Expression >(expr_node) );
+	return ret;
+} // build_fieldSel
+
+Expression * build_pfieldSel( ExpressionNode * expr_node, Expression * member ) {
+	UntypedExpr * deref = new UntypedExpr( new NameExpr( "*?" ) );
 	deref->location = expr_node->location;
 	deref->get_args().push_back( maybeMoveBuild< Expression >(expr_node) );
-	UntypedMemberExpr *ret = new UntypedMemberExpr( member, deref );
-	return ret;
-}
-
-Expression *build_addressOf( ExpressionNode *expr_node ) {
+	UntypedMemberExpr * ret = new UntypedMemberExpr( member, deref );
+	return ret;
+} // build_pfieldSel
+
+Expression * build_addressOf( ExpressionNode * expr_node ) {
 		return new AddressExpr( maybeMoveBuild< Expression >(expr_node) );
-}
-Expression *build_sizeOfexpr( ExpressionNode *expr_node ) {
+} // build_addressOf
+
+Expression * build_sizeOfexpr( ExpressionNode * expr_node ) {
 	return new SizeofExpr( maybeMoveBuild< Expression >(expr_node) );
-}
-Expression *build_sizeOftype( DeclarationNode *decl_node ) {
+} // build_sizeOfexpr
+
+Expression * build_sizeOftype( DeclarationNode * decl_node ) {
 	return new SizeofExpr( maybeMoveBuildType( decl_node ) );
-}
-Expression *build_alignOfexpr( ExpressionNode *expr_node ) {
+} // build_sizeOftype
+
+Expression * build_alignOfexpr( ExpressionNode * expr_node ) {
 	return new AlignofExpr( maybeMoveBuild< Expression >(expr_node) );
-}
-Expression *build_alignOftype( DeclarationNode *decl_node ) {
+} // build_alignOfexpr
+
+Expression * build_alignOftype( DeclarationNode * decl_node ) {
 	return new AlignofExpr( maybeMoveBuildType( decl_node) );
-}
-Expression *build_offsetOf( DeclarationNode *decl_node, NameExpr *member ) {
+} // build_alignOftype
+
+Expression * build_offsetOf( DeclarationNode * decl_node, NameExpr * member ) {
 	Expression * ret = new UntypedOffsetofExpr( maybeMoveBuildType( decl_node ), member->get_name() );
 	delete member;
 	return ret;
-}
-
-Expression *build_and_or( ExpressionNode *expr_node1, ExpressionNode *expr_node2, bool kind ) {
+} // build_offsetOf
+
+Expression * build_and_or( ExpressionNode * expr_node1, ExpressionNode * expr_node2, bool kind ) {
 	return new LogicalExpr( notZeroExpr( maybeMoveBuild< Expression >(expr_node1) ), notZeroExpr( maybeMoveBuild< Expression >(expr_node2) ), kind );
-}
-
-Expression *build_unary_val( OperKinds op, ExpressionNode *expr_node ) {
+} // build_and_or
+
+Expression * build_unary_val( OperKinds op, ExpressionNode * expr_node ) {
 	std::list< Expression * > args;
 	args.push_back( maybeMoveBuild< Expression >(expr_node) );
 	return new UntypedExpr( new NameExpr( OperName[ (int)op ] ), args );
-}
-Expression *build_unary_ptr( OperKinds op, ExpressionNode *expr_node ) {
+} // build_unary_val
+
+Expression * build_unary_ptr( OperKinds op, ExpressionNode * expr_node ) {
 	std::list< Expression * > args;
 	args.push_back( new AddressExpr( maybeMoveBuild< Expression >(expr_node) ) );
 	return new UntypedExpr( new NameExpr( OperName[ (int)op ] ), args );
-}
-Expression *build_binary_val( OperKinds op, ExpressionNode *expr_node1, ExpressionNode *expr_node2 ) {
+} // build_unary_ptr
+
+Expression * build_binary_val( OperKinds op, ExpressionNode * expr_node1, ExpressionNode * expr_node2 ) {
 	std::list< Expression * > args;
 	args.push_back( maybeMoveBuild< Expression >(expr_node1) );
 	args.push_back( maybeMoveBuild< Expression >(expr_node2) );
 	return new UntypedExpr( new NameExpr( OperName[ (int)op ] ), args );
-}
-Expression *build_binary_ptr( OperKinds op, ExpressionNode *expr_node1, ExpressionNode *expr_node2 ) {
+} // build_binary_val
+
+Expression * build_binary_ptr( OperKinds op, ExpressionNode * expr_node1, ExpressionNode * expr_node2 ) {
 	std::list< Expression * > args;
 	args.push_back( new AddressExpr( maybeMoveBuild< Expression >(expr_node1) ) );
 	args.push_back( maybeMoveBuild< Expression >(expr_node2) );
 	return new UntypedExpr( new NameExpr( OperName[ (int)op ] ), args );
-}
-
-Expression *build_cond( ExpressionNode *expr_node1, ExpressionNode *expr_node2, ExpressionNode *expr_node3 ) {
+} // build_binary_ptr
+
+Expression * build_cond( ExpressionNode * expr_node1, ExpressionNode * expr_node2, ExpressionNode * expr_node3 ) {
 	return new ConditionalExpr( notZeroExpr( maybeMoveBuild< Expression >(expr_node1) ), maybeMoveBuild< Expression >(expr_node2), maybeMoveBuild< Expression >(expr_node3) );
-}
-
-Expression *build_comma( ExpressionNode *expr_node1, ExpressionNode *expr_node2 ) {
+} // build_cond
+
+Expression * build_comma( ExpressionNode * expr_node1, ExpressionNode * expr_node2 ) {
 	return new CommaExpr( maybeMoveBuild< Expression >(expr_node1), maybeMoveBuild< Expression >(expr_node2) );
-}
-
-Expression *build_attrexpr( NameExpr *var, ExpressionNode * expr_node ) {
+} // build_comma
+
+Expression * build_attrexpr( NameExpr * var, ExpressionNode * expr_node ) {
 	return new AttrExpr( var, maybeMoveBuild< Expression >(expr_node) );
-}
-Expression *build_attrtype( NameExpr *var, DeclarationNode * decl_node ) {
+} // build_attrexpr
+
+Expression * build_attrtype( NameExpr * var, DeclarationNode * decl_node ) {
 	return new AttrExpr( var, maybeMoveBuildType( decl_node ) );
-}
-
-Expression *build_tuple( ExpressionNode * expr_node ) {
+} // build_attrtype
+
+Expression * build_tuple( ExpressionNode * expr_node ) {
 	std::list< Expression * > exprs;
 	buildMoveList( expr_node, exprs );
 	return new UntypedTupleExpr( exprs );;
-}
-
-Expression *build_func( ExpressionNode * function, ExpressionNode * expr_node ) {
+} // build_tuple
+
+Expression * build_func( ExpressionNode * function, ExpressionNode * expr_node ) {
 	std::list< Expression * > args;
 	buildMoveList( expr_node, args );
 	return new UntypedExpr( maybeMoveBuild< Expression >(function), args, nullptr );
-}
-
-Expression *build_range( ExpressionNode * low, ExpressionNode *high ) {
+} // build_func
+
+Expression * build_range( ExpressionNode * low, ExpressionNode * high ) {
 	return new RangeExpr( maybeMoveBuild< Expression >( low ), maybeMoveBuild< Expression >( high ) );
-}
-
-Expression *build_asmexpr( ExpressionNode *inout, ConstantExpr *constraint, ExpressionNode *operand ) {
+} // build_range
+
+Expression * build_asmexpr( ExpressionNode * inout, ConstantExpr * constraint, ExpressionNode * operand ) {
 	return new AsmExpr( maybeMoveBuild< Expression >( inout ), constraint, maybeMoveBuild< Expression >(operand) );
-}
-
-Expression *build_valexpr( StatementNode *s ) {
+} // build_asmexpr
+
+Expression * build_valexpr( StatementNode * s ) {
 	return new StmtExpr( dynamic_cast< CompoundStmt * >(maybeMoveBuild< Statement >(s) ) );
-}
-Expression *build_typevalue( DeclarationNode *decl ) {
+} // build_valexpr
+
+Expression * build_typevalue( DeclarationNode * decl ) {
 	return new TypeExpr( maybeMoveBuildType( decl ) );
-}
-
-Expression *build_compoundLiteral( DeclarationNode *decl_node, InitializerNode *kids ) {
+} // build_typevalue
+
+Expression * build_compoundLiteral( DeclarationNode * decl_node, InitializerNode * kids ) {
 	Declaration * newDecl = maybeBuild< Declaration >(decl_node); // compound literal type
 	if ( DeclarationWithType * newDeclWithType = dynamic_cast< DeclarationWithType * >( newDecl ) ) { // non-sue compound-literal type
@@ -388,5 +393,5 @@
 		assert( false );
 	} // if
-}
+} // build_compoundLiteral
 
 // Local Variables: //
Index: src/Parser/InitializerNode.cc
===================================================================
--- src/Parser/InitializerNode.cc	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/Parser/InitializerNode.cc	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 13:20:24 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Oct  1 23:09:51 2016
-// Update Count     : 21
+// Last Modified On : Fri Jul 28 23:27:20 2017
+// Update Count     : 26
 //
 
@@ -22,16 +22,16 @@
 #include "SynTree/Initializer.h"
 
-InitializerNode::InitializerNode( ExpressionNode *_expr, bool aggrp, ExpressionNode *des )
-		: expr( _expr ), aggregate( aggrp ), designator( des ), kids( 0 ), maybeConstructed( true ) {
+InitializerNode::InitializerNode( ExpressionNode * _expr, bool aggrp, ExpressionNode * des )
+		: expr( _expr ), aggregate( aggrp ), designator( des ), kids( nullptr ), maybeConstructed( true ) {
 	if ( aggrp )
 		kids = dynamic_cast< InitializerNode * >( get_next() );
 
-	if ( kids != 0 )
-		set_last( 0 );
-}
+	if ( kids )
+		set_last( nullptr );
+} // InitializerNode::InitializerNode
 
-InitializerNode::InitializerNode( InitializerNode *init, bool aggrp, ExpressionNode *des )
-		: expr( 0 ), aggregate( aggrp ), designator( des ), kids( 0 ), maybeConstructed( true ) {
-	if ( init != 0 )
+InitializerNode::InitializerNode( InitializerNode * init, bool aggrp, ExpressionNode * des )
+		: expr( nullptr ), aggregate( aggrp ), designator( des ), kids( nullptr ), maybeConstructed( true ) {
+	if ( init )
 		set_last( init );
 
@@ -39,7 +39,7 @@
 		kids = dynamic_cast< InitializerNode * >( get_next() );
 
-	if ( kids != 0 )
-		set_next( 0 );
-}
+	if ( kids )
+		set_next( nullptr );
+} // InitializerNode::InitializerNode
 
 InitializerNode::~InitializerNode() {
@@ -47,16 +47,16 @@
 	delete designator;
 	delete kids;
-}
+} // InitializerNode::~InitializerNode
 
 void InitializerNode::print( std::ostream &os, int indent ) const {
 	os << std::string( indent, ' ' ) << "Initializer expression" << std::endl;
-}
+} // InitializerNode::print
 
 void InitializerNode::printOneLine( std::ostream &os ) const {
 	if ( ! aggregate ) {
-		if ( designator != 0 ) {
+		if ( designator ) {
 			os << "designated by: (";
 			ExpressionNode *curdes = designator;
-			while ( curdes != 0) {
+			while ( curdes != nullptr) {
 				curdes->printOneLine(os);
 				curdes = (ExpressionNode *)(curdes->get_next());
@@ -65,9 +65,9 @@
 			os << ")";
 		} // if
-		if ( expr ) expr->printOneLine(os);
+		if ( expr ) expr->printOneLine( os );
 	} else {  // It's an aggregate
 		os << "[--";
-		if ( next_init() != 0 )
-			next_init()->printOneLine(os);
+		if ( next_init() != nullptr )
+			next_init()->printOneLine( os );
 		if (aggregate) os << "--]";
 	} // if
@@ -76,8 +76,8 @@
 	if ( (moreInit = dynamic_cast< InitializerNode * >( get_next() ) ) ) {
 		moreInit->printOneLine( os );
-	}
-}
+	} // if
+} // InitializerNode::printOneLine
 
-Initializer *InitializerNode::build() const {
+Initializer * InitializerNode::build() const {
 	if ( aggregate ) {
 		// steal designators from children
@@ -93,10 +93,10 @@
 		return new ListInit( initlist, designlist, maybeConstructed );
 	} else {
-		if ( get_expression() != 0) {
+		if ( get_expression() ) {
 			return new SingleInit( maybeBuild< Expression >( get_expression() ), maybeConstructed );
-		}
+		} // if
 	} // if
-	return 0;
-}
+	return nullptr;
+} // InitializerNode::build
 
 // Local Variables: //
Index: src/Parser/ParseNode.h
===================================================================
--- src/Parser/ParseNode.h	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/Parser/ParseNode.h	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -9,7 +9,7 @@
 // Author           : Rodolfo G. Esteves
 // Created On       : Sat May 16 13:28:16 2015
-// Last Modified By : Andrew Beach
-// Last Modified On : Tus Jul 25 10:09:00 2017
-// Update Count     : 787
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Thu Jul 27 12:08:08 2017
+// Update Count     : 788
 //
 
@@ -159,5 +159,4 @@
 Expression * build_constantFloat( const std::string &str );
 Expression * build_constantChar( const std::string &str );
-Expression * build_constantZeroOne( const std::string &str );
 ConstantExpr * build_constantStr( const std::string &str );
 Expression * build_field_name_FLOATINGconstant( const std::string & str );
Index: src/Parser/TypeData.cc
===================================================================
--- src/Parser/TypeData.cc	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/Parser/TypeData.cc	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 15:12:51 2015
 // Last Modified By : Andrew Beach
-// Last Modified On : Tus Jul 18 10:10:00 2017
-// Update Count     : 566
+// Last Modified On : Wed Aug  9 13:50:00 2017
+// Update Count     : 567
 //
 
@@ -748,10 +748,10 @@
 } // buildAggInst
 
-NamedTypeDecl * buildSymbolic( const TypeData * td, const string & name, Type::StorageClasses scs ) {
+NamedTypeDecl * buildSymbolic( const TypeData * td, const string & name, Type::StorageClasses scs, LinkageSpec::Spec linkage ) {
 	assert( td->kind == TypeData::Symbolic );
 	NamedTypeDecl * ret;
 	assert( td->base );
 	if ( td->symbolic.isTypedef ) {
-		ret = new TypedefDecl( name, scs, typebuild( td->base ) );
+		ret = new TypedefDecl( name, scs, typebuild( td->base ), linkage );
 	} else {
 		ret = new TypeDecl( name, scs, typebuild( td->base ), TypeDecl::Any );
@@ -817,5 +817,5 @@
 		return buildEnum( td, attributes );
 	} else if ( td->kind == TypeData::Symbolic ) {
-		return buildSymbolic( td, name, scs );
+		return buildSymbolic( td, name, scs, linkage );
 	} else {
 		return (new ObjectDecl( name, scs, linkage, bitfieldWidth, typebuild( td ), init, attributes ))->set_asmName( asmName );
Index: src/Parser/lex.ll
===================================================================
--- src/Parser/lex.ll	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/Parser/lex.ll	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -10,9 +10,10 @@
  * Created On       : Sat Sep 22 08:58:10 2001
  * Last Modified By : Peter A. Buhr
- * Last Modified On : Mon Jul 24 08:27:23 2017
- * Update Count     : 545
+ * Last Modified On : Thu Jul 27 21:46:06 2017
+ * Update Count     : 550
  */
 
 %option yylineno
+%option noyywrap
 %option nounput
 
@@ -288,6 +289,4 @@
 
 				/* numeric constants */
-"0"				{ NUMERIC_RETURN(ZERO); }				// CFA
-"1"				{ NUMERIC_RETURN(ONE); }				// CFA
 {decimal_constant} { NUMERIC_RETURN(INTEGERconstant); }
 {octal_constant} { NUMERIC_RETURN(INTEGERconstant); }
@@ -420,5 +419,5 @@
 
 				/* unknown characters */
-.			{ printf("unknown character(s):\"%s\" on line %d\n", yytext, yylineno); }
+.				{ printf("unknown character(s):\"%s\" on line %d\n", yytext, yylineno); }
 
 %%
Index: src/Parser/parser.yy
===================================================================
--- src/Parser/parser.yy	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/Parser/parser.yy	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -10,6 +10,6 @@
 // Created On       : Sat Sep  1 20:22:55 2001
 // Last Modified By : Andrew Beach
-// Last Modified On : Tus Jul 25 10:07:00 2017
-// Update Count     : 2464
+// Last Modified On : Wed Aug  4 13:33:00 2017
+// Update Count     : 2475
 //
 
@@ -142,5 +142,4 @@
 // converted into the tuple index (.)(1). e.g., 3.x
 %token<tok>	REALDECIMALconstant	REALFRACTIONconstant	FLOATINGconstant
-%token<tok> ZERO				ONE						// CFA
 
 // multi-character operators
@@ -159,5 +158,5 @@
 %token ATassign											// @=
 
-%type<tok> identifier  no_attr_identifier  zero_one
+%type<tok> identifier  no_attr_identifier
 %type<tok> identifier_or_type_name  no_attr_identifier_or_type_name  attr_name
 %type<constant> string_literal
@@ -183,4 +182,5 @@
 %type<en> asm_clobbers_list_opt
 %type<flag> asm_volatile_opt
+%type<en> handler_predicate_opt
 
 // statements
@@ -360,9 +360,4 @@
 	;
 
-zero_one:												// CFA
-	ZERO
-	| ONE
- 	;
-
 string_literal:
 	string_literal_list							{ $$ = build_constantStr( *$1 ); }
@@ -384,6 +379,4 @@
 	IDENTIFIER											// typedef name cannot be used as a variable name
 		{ $$ = new ExpressionNode( build_varref( $1 ) ); }
-	| zero_one
-		{ $$ = new ExpressionNode( build_constantZeroOne( *$1 ) ); }
 	| tuple
 	| '(' comma_expression ')'
@@ -485,8 +478,4 @@
 			$$ = new ExpressionNode( build_field_name_fraction_constants( build_varref( $1 ), $2 ) );
 		}
-	| zero_one fraction_constants
-		{
-			$$ = new ExpressionNode( build_field_name_fraction_constants( build_constantZeroOne( *$1 ), $2 ) );
-		}
 	;
 
@@ -539,5 +528,5 @@
 	| ALIGNOF unary_expression							// GCC, variable alignment
 		{ $$ = new ExpressionNode( build_alignOfexpr( $2 ) ); }
-	| ALIGNOF '(' type_no_function ')'				// GCC, type alignment
+	| ALIGNOF '(' type_no_function ')'					// GCC, type alignment
 		{ $$ = new ExpressionNode( build_alignOftype( $3 ) ); }
 	| OFFSETOF '(' type_no_function ',' no_attr_identifier ')'
@@ -980,19 +969,15 @@
 
 handler_clause:
-	// TEMPORARY, TEST EXCEPTIONS
-	handler_key '(' push push INTEGERconstant pop ')' compound_statement pop
-		{ $$ = new StatementNode( build_catch( $1, nullptr, new ExpressionNode( build_constantInteger( *$5 ) ), $8 ) ); }
-	| handler_clause handler_key '(' push push INTEGERconstant pop ')' compound_statement pop
-		{ $$ = (StatementNode *)$1->set_last( new StatementNode( build_catch( $2, nullptr, new ExpressionNode( build_constantInteger( *$6 ) ), $9 ) ) ); }
-
-	| handler_key '(' push push exception_declaration pop handler_predicate_opt ')' compound_statement pop
-		{ $$ = new StatementNode( build_catch( $1, $5, nullptr, $9 ) ); }
+	handler_key '(' push push exception_declaration pop handler_predicate_opt ')' compound_statement pop
+		{ $$ = new StatementNode( build_catch( $1, $5, $7, $9 ) ); }
 	| handler_clause handler_key '(' push push exception_declaration pop handler_predicate_opt ')' compound_statement pop
-		{ $$ = (StatementNode *)$1->set_last( new StatementNode( build_catch( $2, $6, nullptr, $10 ) ) ); }
+		{ $$ = (StatementNode *)$1->set_last( new StatementNode( build_catch( $2, $6, $8, $10 ) ) ); }
 	;
 
 handler_predicate_opt:
 	//empty
+		{ $$ = nullptr; }
 	| ';' conditional_expression
+		{ $$ = $2; }
 	;
 
@@ -1686,28 +1671,4 @@
 	| aggregate_key attribute_list_opt typegen_name		// CFA
 		{ $$ = $3->addQualifiers( $2 ); }
-
-// Temp, testing TreeStruct
-    | STRUCT TRY attribute_list_opt no_attr_identifier_or_type_name
-        {
-            typedefTable.makeTypedef( *$4 );            // create typedef
-            if ( forall ) typedefTable.changeKind( *$4, TypedefTable::TG ); // $
-            forall = false;                             // reset
-        }
-      '{' field_declaration_list '}'
-        {
-            $$ = DeclarationNode::newTreeStruct( DeclarationNode::Struct,
-                $4, nullptr, nullptr, $7, true )->addQualifiers( $3 );
-        }
-    | STRUCT TRY attribute_list_opt no_attr_identifier_or_type_name TYPEDEFname
-        {
-            typedefTable.makeTypedef( *$4 );            // create typedef
-            if ( forall ) typedefTable.changeKind( *$4, TypedefTable::TG ); // $
-            forall = false;                             // reset
-        }
-      '{' field_declaration_list '}'
-        {
-            $$ = DeclarationNode::newTreeStruct( DeclarationNode::Struct,
-                $4, $5, nullptr, $8, true )->addQualifiers( $3 );
-        }
 	;
 
@@ -1969,4 +1930,6 @@
 	| '=' initializer
 		{ $$ = $2; }
+	| '=' VOID
+		{ $$ = nullptr; }
 	| ATassign initializer
 		{ $$ = $2->set_maybeConstructed( false ); }
Index: src/ResolvExpr/CurrentObject.cc
===================================================================
--- src/ResolvExpr/CurrentObject.cc	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/ResolvExpr/CurrentObject.cc	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -36,5 +36,5 @@
 				return constExpr->get_constant()->get_ival();
 			} else {
-				assertf( false, "Non-integer constant expression in getConstValue", toString( constExpr ).c_str() ); // xxx - might be semantic error
+				assertf( false, "Non-integer constant expression in getConstValue %s", toString( constExpr ).c_str() ); // xxx - might be semantic error
 			}
 		} else if ( dynamic_cast< OneType * >( constExpr->get_result() ) ) {
@@ -176,5 +176,5 @@
 				setPosition( castExpr->get_arg() );
 			} else if ( VariableExpr * varExpr = dynamic_cast< VariableExpr * >( expr ) ) {
-				assertf( dynamic_cast<EnumInstType *> ( varExpr->get_result() ), "ArrayIterator given variable that isn't an enum constant", toString( expr ).c_str() );
+				assertf( dynamic_cast<EnumInstType *> ( varExpr->get_result() ), "ArrayIterator given variable that isn't an enum constant : %s", toString( expr ).c_str() );
 				index = 0; // xxx - get actual value of enum constant
 			} else if ( dynamic_cast< SizeofExpr * >( expr ) || dynamic_cast< AlignofExpr * >( expr ) ) {
@@ -518,5 +518,5 @@
 			curTypes = newTypes;
 			newTypes.clear();
-			assertf( desigAlts.size() == curTypes.size(), "Designator alternatives (%d) and current types (%d) out of sync", desigAlts.size(), curTypes.size() );
+			assertf( desigAlts.size() == curTypes.size(), "Designator alternatives (%zu) and current types (%zu) out of sync", desigAlts.size(), curTypes.size() );
 		} // for
 		if ( desigAlts.size() > 1 ) {
Index: src/ResolvExpr/Resolver.cc
===================================================================
--- src/ResolvExpr/Resolver.cc	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/ResolvExpr/Resolver.cc	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Sun May 17 12:17:01 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Mar 23 17:23:14 2017
-// Update Count     : 211
+// Last Modified By : Andrew Beach
+// Last Modified On : Tus Aug  8 16:06:00 2017
+// Update Count     : 212
 //
 
@@ -71,4 +71,5 @@
 		virtual void visit( ReturnStmt *returnStmt ) override;
 		virtual void visit( ThrowStmt *throwStmt ) override;
+		virtual void visit( CatchStmt *catchStmt ) override;
 
 		virtual void visit( SingleInit *singleInit ) override;
@@ -368,8 +369,31 @@
 
 	void Resolver::visit( ThrowStmt *throwStmt ) {
+		// TODO: Replace *exception type with &exception type.
 		if ( throwStmt->get_expr() ) {
-			Expression * wrapped = new CastExpr( throwStmt->get_expr(), new BasicType( Type::Qualifiers(), BasicType::SignedInt ) );
+			StructDecl * exception_decl =
+				lookupStruct( "__cfaehm__base_exception_t" );
+			assert( exception_decl );
+			Expression * wrapped = new CastExpr(
+				throwStmt->get_expr(),
+				new PointerType(
+					noQualifiers,
+					new StructInstType(
+						noQualifiers,
+						exception_decl
+						)
+					)
+				);
 			Expression * newExpr = findSingleExpression( wrapped, *this );
 			throwStmt->set_expr( newExpr );
+		}
+	}
+
+	void Resolver::visit( CatchStmt *catchStmt ) {
+		if ( catchStmt->get_cond() ) {
+			Expression * wrapped = new CastExpr(
+				catchStmt->get_cond(),
+				new BasicType( noQualifiers, BasicType::Bool )
+				);
+			catchStmt->set_cond( findSingleExpression( wrapped, *this ) );
 		}
 	}
Index: src/SymTab/Validate.cc
===================================================================
--- src/SymTab/Validate.cc	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/SymTab/Validate.cc	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Sun May 17 21:50:04 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Mar 30 16:50:13 2017
-// Update Count     : 357
+// Last Modified By : Andrew Beach
+// Last Modified On : Tus Aug  8 13:27:00 2017
+// Update Count     : 358
 //
 
@@ -686,9 +686,9 @@
 		Type *designatorType = tyDecl->get_base()->stripDeclarator();
 		if ( StructInstType *aggDecl = dynamic_cast< StructInstType * >( designatorType ) ) {
-			return new StructDecl( aggDecl->get_name() );
+			return new StructDecl( aggDecl->get_name(), DeclarationNode::Struct, noAttributes, tyDecl->get_linkage() );
 		} else if ( UnionInstType *aggDecl = dynamic_cast< UnionInstType * >( designatorType ) ) {
-			return new UnionDecl( aggDecl->get_name() );
+			return new UnionDecl( aggDecl->get_name(), noAttributes, tyDecl->get_linkage() );
 		} else if ( EnumInstType *enumDecl = dynamic_cast< EnumInstType * >( designatorType ) ) {
-			return new EnumDecl( enumDecl->get_name() );
+			return new EnumDecl( enumDecl->get_name(), noAttributes, tyDecl->get_linkage() );
 		} else {
 			return ret->clone();
@@ -783,5 +783,5 @@
 				type = new EnumInstType( Type::Qualifiers(), newDeclEnumDecl->get_name() );
 			} // if
-			TypedefDeclPtr tyDecl( new TypedefDecl( aggDecl->get_name(), Type::StorageClasses(), type ) );
+			TypedefDeclPtr tyDecl( new TypedefDecl( aggDecl->get_name(), Type::StorageClasses(), type, aggDecl->get_linkage() ) );
 			typedefNames[ aggDecl->get_name() ] = std::make_pair( std::move( tyDecl ), scopeLevel );
 		} // if
@@ -903,5 +903,5 @@
 		FunctionType * ftype = functionDecl->get_functionType();
 		std::list< DeclarationWithType * > & retVals = ftype->get_returnVals();
-		assertf( retVals.size() == 0 || retVals.size() == 1, "Function %s has too many return values: %d", functionDecl->get_name().c_str(), retVals.size() );
+		assertf( retVals.size() == 0 || retVals.size() == 1, "Function %s has too many return values: %zu", functionDecl->get_name().c_str(), retVals.size() );
 		if ( retVals.size() == 1 ) {
 			// ensure all function return values have a name - use the name of the function to disambiguate (this also provides a nice bit of help for debugging).
Index: src/SynTree/AggregateDecl.cc
===================================================================
--- src/SynTree/AggregateDecl.cc	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/SynTree/AggregateDecl.cc	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -10,6 +10,6 @@
 // Created On       : Sun May 17 23:56:39 2015
 // Last Modified By : Andrew Beach
-// Last Modified On : Tus Jun 27 15:30:00 2017
-// Update Count     : 21
+// Last Modified On : Fri Aug  4 14:22:00 2017
+// Update Count     : 22
 //
 
@@ -40,6 +40,9 @@
 	using std::endl;
 
-	os << typeString() << " " << get_name();
-	os << string( indent+2, ' ' ) << "with body " << has_body() << endl;
+	os << typeString() << " " << get_name() << ":";
+	if ( get_linkage() != LinkageSpec::Cforall ) {
+		os << " " << LinkageSpec::linkageName( get_linkage() );
+	} // if
+	os << " with body " << has_body() << endl;
 
 	if ( ! parameters.empty() ) {
Index: src/SynTree/Declaration.cc
===================================================================
--- src/SynTree/Declaration.cc	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/SynTree/Declaration.cc	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Mar 16 07:49:18 2017
-// Update Count     : 24
+// Last Modified By : Andrew Beach
+// Last Modified On : Wed Aug  9 14:38:00 2017
+// Update Count     : 25
 //
 
@@ -28,9 +28,9 @@
 
 Declaration::Declaration( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage )
-		: name( name ), storageClasses( scs ), linkage( linkage ), uniqueId( 0 ) {
+		: name( name ), linkage( linkage ), storageClasses( scs ), uniqueId( 0 ) {
 }
 
 Declaration::Declaration( const Declaration &other )
-	: BaseSyntaxNode( other ), name( other.name ), storageClasses( other.storageClasses ), linkage( other.linkage ), uniqueId( other.uniqueId ) {
+	: BaseSyntaxNode( other ), name( other.name ), linkage( other.linkage ), extension( other.extension ), storageClasses( other.storageClasses ), uniqueId( other.uniqueId ) {
 }
 
Index: src/SynTree/Declaration.h
===================================================================
--- src/SynTree/Declaration.h	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/SynTree/Declaration.h	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Jul 22 09:52:59 2017
-// Update Count     : 124
+// Last Modified By : Andrew Beach
+// Last Modified On : Wed Aug  9 14:45:00 2017
+// Update Count     : 126
 //
 
@@ -27,4 +27,8 @@
 class Declaration : public BaseSyntaxNode {
   public:
+	std::string name;
+	LinkageSpec::Spec linkage;
+	bool extension = false;
+
 	Declaration( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage );
 	Declaration( const Declaration &other );
@@ -53,41 +57,12 @@
 	static void dumpIds( std::ostream &os );
 	static Declaration *declFromId( UniqueId id );
-  private:
-	std::string name;
+
+  private:
 	Type::StorageClasses storageClasses;
-	LinkageSpec::Spec linkage;
 	UniqueId uniqueId;
-	bool extension = false;
 };
 
 class DeclarationWithType : public Declaration {
   public:
-	DeclarationWithType( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, const std::list< Attribute * > & attributes, Type::FuncSpecifiers fs );
-	DeclarationWithType( const DeclarationWithType &other );
-	virtual ~DeclarationWithType();
-
-	std::string get_mangleName() const { return mangleName; }
-	DeclarationWithType * set_mangleName( std::string newValue ) { mangleName = newValue; return this; }
-
-	std::string get_scopedMangleName() const { return mangleName + "_" + std::to_string(scopeLevel); }
-
-	int get_scopeLevel() const { return scopeLevel; }
-	DeclarationWithType * set_scopeLevel( int newValue ) { scopeLevel = newValue; return this; }
-
-	ConstantExpr *get_asmName() const { return asmName; }
-	DeclarationWithType * set_asmName( ConstantExpr *newValue ) { asmName = newValue; return this; }
-
-	std::list< Attribute * >& get_attributes() { return attributes; }
-	const std::list< Attribute * >& get_attributes() const { return attributes; }
-
-	Type::FuncSpecifiers get_funcSpec() const { return fs; }
-	//void set_functionSpecifiers( Type::FuncSpecifiers newValue ) { fs = newValue; }
-
-	virtual DeclarationWithType *clone() const = 0;
-	virtual DeclarationWithType *acceptMutator( Mutator &m ) = 0;
-
-	virtual Type *get_type() const = 0;
-	virtual void set_type(Type *) = 0;
-  private:
 	// this represents the type with all types and typedefs expanded it is generated by SymTab::Validate::Pass2
 	std::string mangleName;
@@ -97,4 +72,33 @@
 	ConstantExpr *asmName;
 	std::list< Attribute * > attributes;
+
+	DeclarationWithType( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, const std::list< Attribute * > & attributes, Type::FuncSpecifiers fs );
+	DeclarationWithType( const DeclarationWithType &other );
+	virtual ~DeclarationWithType();
+
+	std::string get_mangleName() const { return mangleName; }
+	DeclarationWithType * set_mangleName( std::string newValue ) { mangleName = newValue; return this; }
+
+	std::string get_scopedMangleName() const { return mangleName + "_" + std::to_string(scopeLevel); }
+
+	int get_scopeLevel() const { return scopeLevel; }
+	DeclarationWithType * set_scopeLevel( int newValue ) { scopeLevel = newValue; return this; }
+
+	ConstantExpr *get_asmName() const { return asmName; }
+	DeclarationWithType * set_asmName( ConstantExpr *newValue ) { asmName = newValue; return this; }
+
+	std::list< Attribute * >& get_attributes() { return attributes; }
+	const std::list< Attribute * >& get_attributes() const { return attributes; }
+
+	Type::FuncSpecifiers get_funcSpec() const { return fs; }
+	//void set_functionSpecifiers( Type::FuncSpecifiers newValue ) { fs = newValue; }
+
+	virtual DeclarationWithType *clone() const = 0;
+	virtual DeclarationWithType *acceptMutator( Mutator &m ) = 0;
+
+	virtual Type *get_type() const = 0;
+	virtual void set_type(Type *) = 0;
+
+  private:
 	Type::FuncSpecifiers fs;
 };
@@ -103,4 +107,8 @@
 	typedef DeclarationWithType Parent;
   public:
+	Type *type;
+	Initializer *init;
+	Expression *bitfieldWidth;
+
 	ObjectDecl( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, Expression *bitfieldWidth, Type *type, Initializer *init,
 				const std::list< Attribute * > attributes = std::list< Attribute * >(), Type::FuncSpecifiers fs = Type::FuncSpecifiers() );
@@ -122,8 +130,4 @@
 	virtual void print( std::ostream &os, int indent = 0 ) const;
 	virtual void printShort( std::ostream &os, int indent = 0 ) const;
-  private:
-	Type *type;
-	Initializer *init;
-	Expression *bitfieldWidth;
 };
 
@@ -131,4 +135,7 @@
 	typedef DeclarationWithType Parent;
   public:
+	FunctionType *type;
+	CompoundStmt *statements;
+
 	FunctionDecl( const std::string &name, Type::StorageClasses scs, LinkageSpec::Spec linkage, FunctionType *type, CompoundStmt *statements,
 				  const std::list< Attribute * > attributes = std::list< Attribute * >(), Type::FuncSpecifiers fs = Type::FuncSpecifiers() );
@@ -149,7 +156,4 @@
 	virtual void print( std::ostream &os, int indent = 0 ) const;
 	virtual void printShort( std::ostream &os, int indent = 0 ) const;
-  private:
-	FunctionType *type;
-	CompoundStmt *statements;
 };
 
@@ -157,4 +161,8 @@
 	typedef Declaration Parent;
   public:
+	Type *base;
+	std::list< TypeDecl* > parameters;
+	std::list< DeclarationWithType* > assertions;
+
 	NamedTypeDecl( const std::string &name, Type::StorageClasses scs, Type *type );
 	NamedTypeDecl( const NamedTypeDecl &other );
@@ -171,9 +179,4 @@
 	virtual void print( std::ostream &os, int indent = 0 ) const;
 	virtual void printShort( std::ostream &os, int indent = 0 ) const;
-  protected:
-  private:
-	Type *base;
-	std::list< TypeDecl* > parameters;
-	std::list< DeclarationWithType* > assertions;
 };
 
@@ -182,4 +185,8 @@
   public:
 	enum Kind { Any, Dtype, Ftype, Ttype };
+
+	Type * init;
+	bool sized;
+
 	/// Data extracted from a type decl
 	struct Data {
@@ -216,6 +223,4 @@
   private:
 	Kind kind;
-	Type * init;
-	bool sized;
 };
 
@@ -223,5 +228,5 @@
 	typedef NamedTypeDecl Parent;
   public:
-	TypedefDecl( const std::string &name, Type::StorageClasses scs, Type *type ) : Parent( name, scs, type ) {}
+	TypedefDecl( const std::string &name, Type::StorageClasses scs, Type *type, LinkageSpec::Spec spec = LinkageSpec::Cforall ) : Parent( name, scs, type ) { set_linkage( spec ); }
 	TypedefDecl( const TypedefDecl &other ) : Parent( other ) {}
 
@@ -237,27 +242,26 @@
 	typedef Declaration Parent;
   public:
-	AggregateDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall );
-	AggregateDecl( const AggregateDecl &other );
-	virtual ~AggregateDecl();
-
-	std::list<Declaration*>& get_members() { return members; }
-	std::list<TypeDecl*>& get_parameters() { return parameters; }
-
-	std::list< Attribute * >& get_attributes() { return attributes; }
-	const std::list< Attribute * >& get_attributes() const { return attributes; }
-
-	bool has_body() const { return body; }
-	AggregateDecl * set_body( bool body ) { AggregateDecl::body = body; return this; }
-
-	virtual void print( std::ostream &os, int indent = 0 ) const;
-	virtual void printShort( std::ostream &os, int indent = 0 ) const;
-  protected:
-	virtual std::string typeString() const = 0;
-
-  private:
 	std::list<Declaration*> members;
 	std::list<TypeDecl*> parameters;
 	bool body;
 	std::list< Attribute * > attributes;
+
+	AggregateDecl( const std::string &name, const std::list< Attribute * > & attributes = std::list< class Attribute * >(), LinkageSpec::Spec linkage = LinkageSpec::Cforall );
+	AggregateDecl( const AggregateDecl &other );
+	virtual ~AggregateDecl();
+
+	std::list<Declaration*>& get_members() { return members; }
+	std::list<TypeDecl*>& get_parameters() { return parameters; }
+
+	std::list< Attribute * >& get_attributes() { return attributes; }
+	const std::list< Attribute * >& get_attributes() const { return attributes; }
+
+	bool has_body() const { return body; }
+	AggregateDecl * set_body( bool body ) { AggregateDecl::body = body; return this; }
+
+	virtual void print( std::ostream &os, int indent = 0 ) const;
+	virtual void printShort( std::ostream &os, int indent = 0 ) const;
+  protected:
+	virtual std::string typeString() const = 0;
 };
 
@@ -333,4 +337,6 @@
 class AsmDecl : public Declaration {
   public:
+	AsmStmt *stmt;
+
 	AsmDecl( AsmStmt *stmt );
 	AsmDecl( const AsmDecl &other );
@@ -345,6 +351,4 @@
 	virtual void print( std::ostream &os, int indent = 0 ) const;
 	virtual void printShort( std::ostream &os, int indent = 0 ) const;
-  private:
-	AsmStmt *stmt;
 };
 
Index: src/SynTree/Expression.h
===================================================================
--- src/SynTree/Expression.h	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/SynTree/Expression.h	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Andrew Beach
-// Last Modified On : Mon Jul 24 16:27:00 2017
-// Update Count     : 43
+// Last Modified On : Fri Aug  8 11:54:00 2017
+// Update Count     : 44
 //
 
@@ -29,4 +29,9 @@
 class Expression : public BaseSyntaxNode{
   public:
+	Type * result;
+	TypeSubstitution * env;
+	Expression * argName; // if expression is used as an argument, it can be "designated" by this name
+	bool extension = false;
+
 	Expression( Expression * _aname = nullptr );
 	Expression( const Expression & other );
@@ -49,9 +54,4 @@
 	virtual Expression * acceptMutator( Mutator & m ) = 0;
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  protected:
-	Type * result;
-	TypeSubstitution * env;
-	Expression * argName; // if expression is used as an argument, it can be "designated" by this name
-	bool extension = false;
 };
 
@@ -79,4 +79,6 @@
 class ApplicationExpr : public Expression {
   public:
+	Expression * function;
+
 	ApplicationExpr( Expression * function, const std::list<Expression *> & args = std::list< Expression * >() );
 	ApplicationExpr( const ApplicationExpr & other );
@@ -92,6 +94,6 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
+
   private:
-	Expression * function;
 	std::list<Expression *> args;
 	InferredParams inferParams;
@@ -103,4 +105,7 @@
 class UntypedExpr : public Expression {
   public:
+	Expression * function;
+	std::list<Expression*> args;
+
 	UntypedExpr( Expression * function, const std::list<Expression *> & args = std::list< Expression * >(), Expression *_aname = nullptr );
 	UntypedExpr( const UntypedExpr & other );
@@ -123,7 +128,4 @@
 	virtual void print( std::ostream & os, int indent = 0 ) const;
 	virtual void printArgs(std::ostream & os, int indent = 0) const;
-  private:
-	Expression * function;
-	std::list<Expression*> args;
 };
 
@@ -131,4 +133,6 @@
 class NameExpr : public Expression {
   public:
+	std::string name;
+
 	NameExpr( std::string name, Expression *_aname = nullptr );
 	NameExpr( const NameExpr & other );
@@ -142,6 +146,4 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	std::string name;
 };
 
@@ -152,4 +154,6 @@
 class AddressExpr : public Expression {
   public:
+	Expression * arg;
+
 	AddressExpr( Expression * arg, Expression *_aname = nullptr );
 	AddressExpr( const AddressExpr & other );
@@ -163,6 +167,4 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	Expression * arg;
 };
 
@@ -170,4 +172,6 @@
 class LabelAddressExpr : public Expression {
   public:
+	Expression * arg;
+
 	LabelAddressExpr( Expression * arg );
 	LabelAddressExpr( const LabelAddressExpr & other );
@@ -181,6 +185,4 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	Expression * arg;
 };
 
@@ -188,4 +190,6 @@
 class CastExpr : public Expression {
   public:
+	Expression * arg;
+
 	CastExpr( Expression * arg, Expression *_aname = nullptr );
 	CastExpr( Expression * arg, Type * toType, Expression *_aname = nullptr );
@@ -200,6 +204,4 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	Expression * arg;
 };
 
@@ -207,4 +209,6 @@
 class VirtualCastExpr : public Expression {
   public:
+	Expression * arg;
+
 	VirtualCastExpr( Expression * arg, Type * toType );
 	VirtualCastExpr( const VirtualCastExpr & other );
@@ -218,6 +222,4 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	Expression * arg;
 };
 
@@ -225,4 +227,7 @@
 class UntypedMemberExpr : public Expression {
   public:
+	Expression * member;
+	Expression * aggregate;
+
 	UntypedMemberExpr( Expression * member, Expression * aggregate, Expression *_aname = nullptr );
 	UntypedMemberExpr( const UntypedMemberExpr & other );
@@ -238,7 +243,4 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	Expression * member;
-	Expression * aggregate;
 };
 
@@ -247,4 +249,7 @@
 class MemberExpr : public Expression {
   public:
+	DeclarationWithType * member;
+	Expression * aggregate;
+
 	MemberExpr( DeclarationWithType * member, Expression * aggregate, Expression *_aname = nullptr );
 	MemberExpr( const MemberExpr & other );
@@ -260,7 +265,4 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	DeclarationWithType * member;
-	Expression * aggregate;
 };
 
@@ -269,4 +271,6 @@
 class VariableExpr : public Expression {
   public:
+	DeclarationWithType * var;
+
 	VariableExpr( DeclarationWithType * var, Expression *_aname = nullptr );
 	VariableExpr( const VariableExpr & other );
@@ -280,6 +284,4 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	DeclarationWithType * var;
 };
 
@@ -287,4 +289,6 @@
 class ConstantExpr : public Expression {
   public:
+	Constant constant;
+
 	ConstantExpr( Constant constant, Expression *_aname = nullptr );
 	ConstantExpr( const ConstantExpr & other );
@@ -298,6 +302,4 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	Constant constant;
 };
 
@@ -305,4 +307,8 @@
 class SizeofExpr : public Expression {
   public:
+	Expression * expr;
+	Type * type;
+	bool isType;
+
 	SizeofExpr( Expression * expr, Expression *_aname = nullptr );
 	SizeofExpr( const SizeofExpr & other );
@@ -321,13 +327,13 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
+};
+
+/// AlignofExpr represents an alignof expression
+class AlignofExpr : public Expression {
+  public:
 	Expression * expr;
 	Type * type;
 	bool isType;
-};
-
-/// AlignofExpr represents an alignof expression
-class AlignofExpr : public Expression {
-  public:
+
 	AlignofExpr( Expression * expr, Expression *_aname = nullptr );
 	AlignofExpr( const AlignofExpr & other );
@@ -346,8 +352,4 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	Expression * expr;
-	Type * type;
-	bool isType;
 };
 
@@ -355,4 +357,7 @@
 class UntypedOffsetofExpr : public Expression {
   public:
+	Type * type;
+	std::string member;
+
 	UntypedOffsetofExpr( Type * type, const std::string & member, Expression *_aname = nullptr );
 	UntypedOffsetofExpr( const UntypedOffsetofExpr & other );
@@ -368,7 +373,4 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	Type * type;
-	std::string member;
 };
 
@@ -376,4 +378,7 @@
 class OffsetofExpr : public Expression {
   public:
+	Type * type;
+	DeclarationWithType * member;
+
 	OffsetofExpr( Type * type, DeclarationWithType * member, Expression *_aname = nullptr );
 	OffsetofExpr( const OffsetofExpr & other );
@@ -389,7 +394,4 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	Type * type;
-	DeclarationWithType * member;
 };
 
@@ -397,4 +399,6 @@
 class OffsetPackExpr : public Expression {
 public:
+	StructInstType * type;
+
 	OffsetPackExpr( StructInstType * type_, Expression * aname_ = 0 );
 	OffsetPackExpr( const OffsetPackExpr & other );
@@ -407,9 +411,5 @@
 	virtual void accept( Visitor & v ) { v.visit( this ); }
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
-
-	virtual void print( std::ostream & os, int indent = 0 ) const;
-
-private:
-	StructInstType * type;
+	virtual void print( std::ostream & os, int indent = 0 ) const;
 };
 
@@ -417,4 +417,9 @@
 class AttrExpr : public Expression {
   public:
+	Expression * attr;
+	Expression * expr;
+	Type * type;
+	bool isType;
+
 	AttrExpr(Expression * attr, Expression * expr, Expression *_aname = nullptr );
 	AttrExpr( const AttrExpr & other );
@@ -435,9 +440,4 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	Expression * attr;
-	Expression * expr;
-	Type * type;
-	bool isType;
 };
 
@@ -445,4 +445,7 @@
 class LogicalExpr : public Expression {
   public:
+	Expression * arg1;
+	Expression * arg2;
+
 	LogicalExpr( Expression * arg1, Expression * arg2, bool andp = true, Expression *_aname = nullptr );
 	LogicalExpr( const LogicalExpr & other );
@@ -459,13 +462,16 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
+
   private:
+	bool isAnd;
+};
+
+/// ConditionalExpr represents the three-argument conditional ( p ? a : b )
+class ConditionalExpr : public Expression {
+  public:
 	Expression * arg1;
 	Expression * arg2;
-	bool isAnd;
-};
-
-/// ConditionalExpr represents the three-argument conditional ( p ? a : b )
-class ConditionalExpr : public Expression {
-  public:
+	Expression * arg3;
+
 	ConditionalExpr( Expression * arg1, Expression * arg2, Expression * arg3, Expression *_aname = nullptr );
 	ConditionalExpr( const ConditionalExpr & other );
@@ -483,13 +489,12 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
+};
+
+/// CommaExpr represents the sequence operator ( a, b )
+class CommaExpr : public Expression {
+  public:
 	Expression * arg1;
 	Expression * arg2;
-	Expression * arg3;
-};
-
-/// CommaExpr represents the sequence operator ( a, b )
-class CommaExpr : public Expression {
-  public:
+
 	CommaExpr( Expression * arg1, Expression * arg2, Expression *_aname = nullptr );
 	CommaExpr( const CommaExpr & other );
@@ -505,7 +510,4 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	Expression * arg1;
-	Expression * arg2;
 };
 
@@ -513,4 +515,6 @@
 class TypeExpr : public Expression {
   public:
+	Type * type;
+
 	TypeExpr( Type * type );
 	TypeExpr( const TypeExpr & other );
@@ -524,6 +528,4 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	Type * type;
 };
 
@@ -531,4 +533,8 @@
 class AsmExpr : public Expression {
   public:
+	Expression * inout;
+	ConstantExpr * constraint;
+	Expression * operand;
+
 	AsmExpr( Expression * inout, ConstantExpr * constraint, Expression * operand ) : inout( inout ), constraint( constraint ), operand( operand ) {}
 	AsmExpr( const AsmExpr & other );
@@ -548,9 +554,6 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
+
 	// https://gcc.gnu.org/onlinedocs/gcc-4.7.1/gcc/Machine-Constraints.html#Machine-Constraints
-	Expression * inout;
-	ConstantExpr * constraint;
-	Expression * operand;
 };
 
@@ -559,24 +562,24 @@
 class ImplicitCopyCtorExpr : public Expression {
 public:
-	ImplicitCopyCtorExpr( ApplicationExpr * callExpr );
-	ImplicitCopyCtorExpr( const ImplicitCopyCtorExpr & other );
-	virtual ~ImplicitCopyCtorExpr();
-
-	ApplicationExpr * get_callExpr() const { return callExpr; }
-	void set_callExpr( ApplicationExpr * newValue ) { callExpr = newValue; }
-
-	std::list< ObjectDecl * > & get_tempDecls() { return tempDecls; }
-	std::list< ObjectDecl * > & get_returnDecls() { return returnDecls; }
-	std::list< Expression * > & get_dtors() { return dtors; }
-
-	virtual ImplicitCopyCtorExpr * clone() const { return new ImplicitCopyCtorExpr( * this ); }
-	virtual void accept( Visitor & v ) { v.visit( this ); }
-	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
-	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
 	ApplicationExpr * callExpr;
 	std::list< ObjectDecl * > tempDecls;
 	std::list< ObjectDecl * > returnDecls;
 	std::list< Expression * > dtors;
+
+	ImplicitCopyCtorExpr( ApplicationExpr * callExpr );
+	ImplicitCopyCtorExpr( const ImplicitCopyCtorExpr & other );
+	virtual ~ImplicitCopyCtorExpr();
+
+	ApplicationExpr * get_callExpr() const { return callExpr; }
+	void set_callExpr( ApplicationExpr * newValue ) { callExpr = newValue; }
+
+	std::list< ObjectDecl * > & get_tempDecls() { return tempDecls; }
+	std::list< ObjectDecl * > & get_returnDecls() { return returnDecls; }
+	std::list< Expression * > & get_dtors() { return dtors; }
+
+	virtual ImplicitCopyCtorExpr * clone() const { return new ImplicitCopyCtorExpr( * this ); }
+	virtual void accept( Visitor & v ) { v.visit( this ); }
+	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
+	virtual void print( std::ostream & os, int indent = 0 ) const;
 };
 
@@ -584,4 +587,6 @@
 class ConstructorExpr : public Expression {
 public:
+	Expression * callExpr;
+
 	ConstructorExpr( Expression * callExpr );
 	ConstructorExpr( const ConstructorExpr & other );
@@ -595,6 +600,4 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-private:
-	Expression * callExpr;
 };
 
@@ -602,4 +605,6 @@
 class CompoundLiteralExpr : public Expression {
   public:
+	Initializer * initializer;
+
 	CompoundLiteralExpr( Type * type, Initializer * initializer );
 	CompoundLiteralExpr( const CompoundLiteralExpr & other );
@@ -613,6 +618,4 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	Initializer * initializer;
 };
 
@@ -620,4 +623,6 @@
 class RangeExpr : public Expression {
   public:
+	Expression * low, * high;
+
 	RangeExpr( Expression * low, Expression * high );
 	RangeExpr( const RangeExpr & other );
@@ -632,6 +637,4 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	Expression * low, * high;
 };
 
@@ -639,4 +642,6 @@
 class UntypedTupleExpr : public Expression {
   public:
+	std::list<Expression*> exprs;
+
 	UntypedTupleExpr( const std::list< Expression * > & exprs, Expression *_aname = nullptr );
 	UntypedTupleExpr( const UntypedTupleExpr & other );
@@ -649,6 +654,4 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	std::list<Expression*> exprs;
 };
 
@@ -656,4 +659,6 @@
 class TupleExpr : public Expression {
   public:
+	std::list<Expression*> exprs;
+
 	TupleExpr( const std::list< Expression * > & exprs, Expression *_aname = nullptr );
 	TupleExpr( const TupleExpr & other );
@@ -666,6 +671,4 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	std::list<Expression*> exprs;
 };
 
@@ -673,4 +676,7 @@
 class TupleIndexExpr : public Expression {
   public:
+	Expression * tuple;
+	unsigned int index;
+
 	TupleIndexExpr( Expression * tuple, unsigned int index );
 	TupleIndexExpr( const TupleIndexExpr & other );
@@ -686,7 +692,4 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	Expression * tuple;
-	unsigned int index;
 };
 
@@ -694,4 +697,6 @@
 class TupleAssignExpr : public Expression {
   public:
+	StmtExpr * stmtExpr = nullptr;
+
 	TupleAssignExpr( const std::list< Expression * > & assigns, const std::list< ObjectDecl * > & tempDecls, Expression * _aname = nullptr );
 	TupleAssignExpr( const TupleAssignExpr & other );
@@ -705,6 +710,4 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	StmtExpr * stmtExpr = nullptr;
 };
 
@@ -712,4 +715,8 @@
 class StmtExpr : public Expression {
 public:
+	CompoundStmt * statements;
+	std::list< ObjectDecl * > returnDecls; // return variable(s) for stmt expression
+	std::list< Expression * > dtors; // destructor(s) for return variable(s)
+
 	StmtExpr( CompoundStmt * statements );
 	StmtExpr( const StmtExpr & other );
@@ -726,12 +733,12 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-private:
-	CompoundStmt * statements;
-	std::list< ObjectDecl * > returnDecls; // return variable(s) for stmt expression
-	std::list< Expression * > dtors; // destructor(s) for return variable(s)
 };
 
 class UniqueExpr : public Expression {
 public:
+	Expression * expr;
+	ObjectDecl * object;
+	VariableExpr * var;
+
 	UniqueExpr( Expression * expr, long long idVal = -1 );
 	UniqueExpr( const UniqueExpr & other );
@@ -753,8 +760,6 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
+
 private:
-	Expression * expr;
-	ObjectDecl * object;
-	VariableExpr * var;
 	int id;
 	static long long count;
@@ -773,4 +778,7 @@
 class UntypedInitExpr : public Expression {
 public:
+	Expression * expr;
+	std::list<InitAlternative> initAlts;
+
 	UntypedInitExpr( Expression * expr, const std::list<InitAlternative> & initAlts );
 	UntypedInitExpr( const UntypedInitExpr & other );
@@ -786,11 +794,11 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-private:
-	Expression * expr;
-	std::list<InitAlternative> initAlts;
 };
 
 class InitExpr : public Expression {
 public:
+	Expression * expr;
+	Designation * designation;
+
 	InitExpr( Expression * expr, Designation * designation );
 	InitExpr( const InitExpr & other );
@@ -807,7 +815,4 @@
 	virtual Expression * acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-private:
-	Expression * expr;
-	Designation * designation;
 };
 
Index: src/SynTree/Initializer.cc
===================================================================
--- src/SynTree/Initializer.cc	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/SynTree/Initializer.cc	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Rob Schluntz
-// Last Modified On : Fri May 13 13:23:03 2016
-// Update Count     : 28
+// Last Modified By : Andrew Beach
+// Last Modified On : Thr Aug  3 11:33:00 2016
+// Update Count     : 29
 //
 
@@ -74,5 +74,5 @@
 			}
 		}
-		assertf( initializers.size() == designations.size(), "Created ListInit with mismatching initializers (%d) and designations (%d)", initializers.size(), designations.size() );
+		assertf( initializers.size() == designations.size(), "Created ListInit with mismatching initializers (%lu) and designations (%lu)", initializers.size(), designations.size() );
 }
 
Index: src/SynTree/Initializer.h
===================================================================
--- src/SynTree/Initializer.h	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/SynTree/Initializer.h	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Jul 22 09:52:02 2017
-// Update Count     : 21
+// Last Modified By : Andrew Beach
+// Last Modified On : Wed Aug  9 10:19:00 2017
+// Update Count     : 22
 //
 
@@ -27,4 +27,6 @@
 class Designation : public BaseSyntaxNode {
 public:
+	std::list< Expression * > designators;
+
 	Designation( const std::list< Expression * > & designators );
 	Designation( const Designation & other );
@@ -37,6 +39,4 @@
 	virtual Designation * acceptMutator( Mutator &m ) { return m.mutate( this ); }
 	virtual void print( std::ostream &os, int indent = 0 ) const;
-private:
-	std::list< Expression * > designators;
 };
 
@@ -63,4 +63,7 @@
 class SingleInit : public Initializer {
   public:
+	//Constant *value;
+	Expression *value;	// has to be a compile-time constant
+
 	SingleInit( Expression *value, bool maybeConstructed = false );
 	SingleInit( const SingleInit &other );
@@ -74,7 +77,4 @@
 	virtual Initializer *acceptMutator( Mutator &m ) { return m.mutate( this ); }
 	virtual void print( std::ostream &os, int indent = 0 ) const;
-  private:
-	//Constant *value;
-	Expression *value;	// has to be a compile-time constant
 };
 
@@ -83,4 +83,7 @@
 class ListInit : public Initializer {
   public:
+	std::list<Initializer *> initializers;  // order *is* important
+	std::list<Designation *> designations;  // order/length is consistent with initializers
+
 	ListInit( const std::list<Initializer*> &initializers,
 			  const std::list<Designation *> &designators = {}, bool maybeConstructed = false );
@@ -102,7 +105,4 @@
 	virtual Initializer *acceptMutator( Mutator &m ) { return m.mutate( this ); }
 	virtual void print( std::ostream &os, int indent = 0 ) const;
-  private:
-	std::list<Initializer *> initializers;  // order *is* important
-	std::list<Designation *> designations;  // order/length is consistent with initializers
 };
 
@@ -113,4 +113,7 @@
 class ConstructorInit : public Initializer {
   public:
+	Statement * ctor;
+	Statement * dtor;
+
 	ConstructorInit( Statement * ctor, Statement * dtor, Initializer * init );
 	ConstructorInit( const ConstructorInit &other );
@@ -130,6 +133,4 @@
 
   private:
-	Statement * ctor;
-	Statement * dtor;
 	// C-style initializer made up of SingleInit and ListInit nodes to use as a fallback
 	// if an appropriate constructor definition is not found by the resolver
Index: src/SynTree/NamedTypeDecl.cc
===================================================================
--- src/SynTree/NamedTypeDecl.cc	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/SynTree/NamedTypeDecl.cc	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Mar 16 07:49:44 2017
-// Update Count     : 13
+// Last Modified By : Andrew Beach
+// Last Modified On : Wed Aug  9 13:28:00 2017
+// Update Count     : 14
 //
 
@@ -38,4 +38,7 @@
 	if ( get_name() != "" ) {
 		os << get_name() << ": ";
+	} // if
+	if ( get_linkage() != LinkageSpec::Cforall ) {
+		os << LinkageSpec::linkageName( get_linkage() ) << " ";
 	} // if
 	get_storageClasses().print( os );
Index: src/SynTree/Statement.h
===================================================================
--- src/SynTree/Statement.h	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/SynTree/Statement.h	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Jul 22 09:54:32 2017
-// Update Count     : 68
+// Last Modified By : Andrew Beach
+// Last Modified On : Thr Aug  3 14:08:00 2017
+// Update Count     : 69
 //
 
@@ -26,4 +26,6 @@
 class Statement : public BaseSyntaxNode {
   public:
+	std::list<Label> labels;
+
 	Statement( std::list<Label> labels );
 	virtual ~Statement();
@@ -36,10 +38,10 @@
 	virtual Statement *acceptMutator( Mutator &m ) = 0;
 	virtual void print( std::ostream &os, int indent = 0 ) const;
-  protected:
-	std::list<Label> labels;
 };
 
 class CompoundStmt : public Statement {
   public:
+	std::list<Statement*> kids;
+
 	CompoundStmt( std::list<Label> labels );
 	CompoundStmt( const CompoundStmt &other );
@@ -54,6 +56,4 @@
 	virtual CompoundStmt *acceptMutator( Mutator &m ) { return m.mutate( this ); }
 	virtual void print( std::ostream &os, int indent = 0 ) const;
-  private:
-	std::list<Statement*> kids;
 };
 
@@ -67,10 +67,10 @@
 	virtual NullStmt *acceptMutator( Mutator &m ) { return m.mutate( this ); }
 	virtual void print( std::ostream &os, int indent = 0 ) const;
-
-  private:
 };
 
 class ExprStmt : public Statement {
   public:
+	Expression *expr;
+
 	ExprStmt( std::list<Label> labels, Expression *expr );
 	ExprStmt( const ExprStmt &other );
@@ -84,10 +84,14 @@
 	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
 	virtual void print( std::ostream &os, int indent = 0 ) const;
-  private:
-	Expression *expr;
 };
 
 class AsmStmt : public Statement {
   public:
+	bool voltile;
+	ConstantExpr *instruction;
+	std::list<Expression *> output, input;
+	std::list<ConstantExpr *> clobber;
+	std::list<Label> gotolabels;
+
 	AsmStmt( std::list<Label> labels, bool voltile, ConstantExpr *instruction, std::list<Expression *> input, std::list<Expression *> output, std::list<ConstantExpr *> clobber, std::list<Label> gotolabels );
 	AsmStmt( const AsmStmt &other );
@@ -111,14 +115,12 @@
 	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
 	virtual void print( std::ostream &os, int indent = 0 ) const;
-  private:
-	bool voltile;
-	ConstantExpr *instruction;
-	std::list<Expression *> output, input;
-	std::list<ConstantExpr *> clobber;
-	std::list<Label> gotolabels;
 };
 
 class IfStmt : public Statement {
   public:
+	Expression *condition;
+	Statement *thenPart;
+	Statement *elsePart;
+
 	IfStmt( std::list<Label> labels, Expression *condition, Statement *thenPart, Statement *elsePart );
 	IfStmt( const IfStmt &other );
@@ -136,12 +138,10 @@
 	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
 	virtual void print( std::ostream &os, int indent = 0 ) const;
-  private:
-	Expression *condition;
-	Statement *thenPart;
-	Statement *elsePart;
 };
 
 class SwitchStmt : public Statement {
   public:
+	Expression * condition;
+
 	SwitchStmt( std::list<Label> labels, Expression *condition, std::list<Statement *> &statements );
 	SwitchStmt( const SwitchStmt &other );
@@ -159,10 +159,12 @@
 	virtual void print( std::ostream &os, int indent = 0 ) const;
   private:
+	std::list<Statement *> statements;
+};
+
+class CaseStmt : public Statement {
+  public:
 	Expression * condition;
-	std::list<Statement *> statements;
-};
-
-class CaseStmt : public Statement {
-  public:
+	std::list<Statement *> stmts;
+
 	CaseStmt( std::list<Label> labels, Expression *conditions, std::list<Statement *> &stmts, bool isdef = false ) throw(SemanticError);
 	CaseStmt( const CaseStmt &other );
@@ -186,6 +188,4 @@
 	virtual void print( std::ostream &os, int indent = 0 ) const;
   private:
-	Expression * condition;
-	std::list<Statement *> stmts;
 	bool _isDefault;
 };
@@ -193,4 +193,8 @@
 class WhileStmt : public Statement {
   public:
+	Expression *condition;
+	Statement *body;
+	bool isDoWhile;
+
 	WhileStmt( std::list<Label> labels, Expression *condition,
 	       Statement *body, bool isDoWhile = false );
@@ -209,12 +213,13 @@
 	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
 	virtual void print( std::ostream &os, int indent = 0 ) const;
-  private:
+};
+
+class ForStmt : public Statement {
+  public:
+	std::list<Statement *> initialization;
 	Expression *condition;
+	Expression *increment;
 	Statement *body;
-	bool isDoWhile;
-};
-
-class ForStmt : public Statement {
-  public:
+
 	ForStmt( std::list<Label> labels, std::list<Statement *> initialization,
 	     Expression *condition = 0, Expression *increment = 0, Statement *body = 0 );
@@ -235,9 +240,4 @@
 	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
 	virtual void print( std::ostream &os, int indent = 0 ) const;
-  private:
-	std::list<Statement *> initialization;
-	Expression *condition;
-	Expression *increment;
-	Statement *body;
 };
 
@@ -245,4 +245,10 @@
   public:
 	enum Type { Goto = 0, Break, Continue };
+
+	// originalTarget kept for error messages.
+	const Label originalTarget;
+	Label target;
+	Expression *computedTarget;
+	Type type;
 
 	BranchStmt( std::list<Label> labels, Label target, Type ) throw (SemanticError);
@@ -265,12 +271,10 @@
   private:
 	static const char *brType[];
-	Label originalTarget;  // can give better error messages if we remember the label name that the user entered
-	Label target;
-	Expression *computedTarget;
-	Type type;
 };
 
 class ReturnStmt : public Statement {
   public:
+	Expression *expr;
+
 	ReturnStmt( std::list<Label> labels, Expression *expr );
 	ReturnStmt( const ReturnStmt &other );
@@ -284,6 +288,4 @@
 	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
 	virtual void print( std::ostream &os, int indent = 0 ) const;
-  private:
-	Expression *expr;
 };
 
@@ -291,4 +293,8 @@
   public:
 	enum Kind { Terminate, Resume };
+
+	const Kind kind;
+	Expression * expr;
+	Expression * target;
 
 	ThrowStmt( std::list<Label> labels, Kind kind, Expression * expr, Expression * target = nullptr );
@@ -306,12 +312,12 @@
 	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
 	virtual void print( std::ostream &os, int indent = 0 ) const;
-  private:
-	Kind kind;
-	Expression * expr;
-	Expression * target;
 };
 
 class TryStmt : public Statement {
   public:
+	CompoundStmt *block;
+	std::list<CatchStmt *> handlers;
+	FinallyStmt *finallyBlock;
+
 	TryStmt( std::list<Label> labels, CompoundStmt *tryBlock, std::list<CatchStmt *> &handlers, FinallyStmt *finallyBlock = 0 );
 	TryStmt( const TryStmt &other );
@@ -329,9 +335,4 @@
 	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
 	virtual void print( std::ostream &os, int indent = 0 ) const;
-
-  private:
-	CompoundStmt *block;
-	std::list<CatchStmt *> handlers;
-	FinallyStmt *finallyBlock;
 };
 
@@ -339,4 +340,9 @@
   public:
 	enum Kind { Terminate, Resume };
+
+	const Kind kind;
+	Declaration *decl;
+	Expression *cond;
+	Statement *body;
 
 	CatchStmt( std::list<Label> labels, Kind kind, Declaration *decl,
@@ -357,14 +363,10 @@
 	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
 	virtual void print( std::ostream &os, int indent = 0 ) const;
-
-  private:
-	Kind kind;
-	Declaration *decl;
-	Expression *cond;
-	Statement *body;
 };
 
 class FinallyStmt : public Statement {
   public:
+	CompoundStmt *block;
+
 	FinallyStmt( std::list<Label> labels, CompoundStmt *block );
 	FinallyStmt( const FinallyStmt &other );
@@ -378,6 +380,4 @@
 	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
 	virtual void print( std::ostream &os, int indent = 0 ) const;
-  private:
-	CompoundStmt *block;
 };
 
@@ -386,4 +386,6 @@
 class DeclStmt : public Statement {
   public:
+	Declaration *decl;
+
 	DeclStmt( std::list<Label> labels, Declaration *decl );
 	DeclStmt( const DeclStmt &other );
@@ -397,6 +399,4 @@
 	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
 	virtual void print( std::ostream &os, int indent = 0 ) const;
-  private:
-	Declaration *decl;
 };
 
@@ -407,4 +407,7 @@
 class ImplicitCtorDtorStmt : public Statement {
   public:
+	// Non-owned pointer to the constructor/destructor statement
+	Statement * callStmt;
+
 	ImplicitCtorDtorStmt( Statement * callStmt );
 	ImplicitCtorDtorStmt( const ImplicitCtorDtorStmt & other );
@@ -418,8 +421,4 @@
 	virtual Statement *acceptMutator( Mutator &m ) { return m.mutate( this ); }
 	virtual void print( std::ostream &os, int indent = 0 ) const;
-
-  private:
-	// Non-owned pointer to the constructor/destructor statement
-	Statement * callStmt;
 };
 
Index: src/SynTree/Type.cc
===================================================================
--- src/SynTree/Type.cc	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/SynTree/Type.cc	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Mar 17 08:42:47 2017
-// Update Count     : 28
+// Last Modified By : Andrew Beach
+// Last Modified On : Wed Aug  2 11:11:00 2017
+// Update Count     : 29
 //
 
@@ -88,4 +88,9 @@
 }
 
+// Empty Variable declarations:
+const Type::FuncSpecifiers noFuncSpecifiers;
+const Type::StorageClasses noStorageClasses;
+const Type::Qualifiers noQualifiers;
+
 std::ostream & operator<<( std::ostream & out, const Type * type ) {
 	if ( type ) {
Index: src/SynTree/Type.h
===================================================================
--- src/SynTree/Type.h	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/SynTree/Type.h	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Jul 22 09:53:29 2017
-// Update Count     : 151
+// Last Modified By : Andrew Beach
+// Last Modified On : Wed Aug  9 14:25:00 2017
+// Update Count     : 152
 //
 
@@ -127,4 +127,10 @@
 	}; // Qualifiers
 
+	typedef std::list<TypeDecl *> ForallList;
+
+	Qualifiers tq;
+	ForallList forall;
+	std::list< Attribute * > attributes;
+
 	Type( const Qualifiers & tq, const std::list< Attribute * > & attributes );
 	Type( const Type & other );
@@ -145,5 +151,4 @@
 	void set_atomic( bool newValue ) { tq.is_atomic = newValue; }
 
-	typedef std::list<TypeDecl *> ForallList;
 	ForallList& get_forall() { return forall; }
 
@@ -165,11 +170,9 @@
 	virtual Type *acceptMutator( Mutator & m ) = 0;
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	Qualifiers tq;
-	ForallList forall;
-	std::list< Attribute * > attributes;
-};
-
-extern Type::Qualifiers noQualifiers;				// no qualifiers on constants
+};
+
+extern const Type::FuncSpecifiers noFuncSpecifiers;
+extern const Type::StorageClasses noStorageClasses;
+extern const Type::Qualifiers noQualifiers;			// no qualifiers on constants
 
 class VoidType : public Type {
@@ -211,5 +214,5 @@
 		LongDoubleImaginary,
 		NUMBER_OF_BASIC_TYPES
-	};
+	} kind;
 
 	static const char *typeNames[];						// string names for basic types, MUST MATCH with Kind
@@ -226,10 +229,15 @@
 
 	bool isInteger() const;
-  private:
-	Kind kind;
 };
 
 class PointerType : public Type {
   public:
+	Type *base;
+
+	// In C99, pointer types can be qualified in many ways e.g., int f( int a[ static 3 ] )
+	Expression *dimension;
+	bool isVarLen;
+	bool isStatic;
+
 	PointerType( const Type::Qualifiers & tq, Type *base, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
 	PointerType( const Type::Qualifiers & tq, Type *base, Expression *dimension, bool isVarLen, bool isStatic, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
@@ -252,15 +260,13 @@
 	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
+};
+
+class ArrayType : public Type {
+  public:
 	Type *base;
-
-	// In C99, pointer types can be qualified in many ways e.g., int f( int a[ static 3 ] )
 	Expression *dimension;
 	bool isVarLen;
 	bool isStatic;
-};
-
-class ArrayType : public Type {
-  public:
+
 	ArrayType( const Type::Qualifiers & tq, Type *base, Expression *dimension, bool isVarLen, bool isStatic, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
 	ArrayType( const ArrayType& );
@@ -282,13 +288,17 @@
 	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	Type *base;
-	Expression *dimension;
-	bool isVarLen;
-	bool isStatic;
 };
 
 class FunctionType : public Type {
   public:
+	std::list<DeclarationWithType*> returnVals;
+	std::list<DeclarationWithType*> parameters;
+
+	// Does the function accept a variable number of arguments following the arguments specified in the parameters list.
+	// This could be because of
+	// - an ellipsis in a prototype declaration
+	// - an unprototyped declaration
+	bool isVarArgs;
+
 	FunctionType( const Type::Qualifiers & tq, bool isVarArgs, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
 	FunctionType( const FunctionType& );
@@ -305,17 +315,12 @@
 	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	std::list<DeclarationWithType*> returnVals;
-	std::list<DeclarationWithType*> parameters;
-
-	// Does the function accept a variable number of arguments following the arguments specified in the parameters list.
-	// This could be because of
-	// - an ellipsis in a prototype declaration
-	// - an unprototyped declaration
-	bool isVarArgs;
 };
 
 class ReferenceToType : public Type {
   public:
+	std::list< Expression* > parameters;
+	std::string name;
+	bool hoistType;
+
 	ReferenceToType( const Type::Qualifiers & tq, const std::string & name, const std::list< Attribute * > & attributes );
 	ReferenceToType( const ReferenceToType & other );
@@ -336,8 +341,4 @@
   protected:
 	virtual std::string typeString() const = 0;
-	std::list< Expression* > parameters;
-	std::string name;
-  private:
-	bool hoistType;
 };
 
@@ -345,4 +346,8 @@
 	typedef ReferenceToType Parent;
   public:
+	// this decl is not "owned" by the struct inst; it is merely a pointer to elsewhere in the tree,
+	// where the structure used in this type is actually defined
+	StructDecl *baseStruct;
+
 	StructInstType( const Type::Qualifiers & tq, const std::string & name, const std::list< Attribute * > & attributes = std::list< Attribute * >()  ) : Parent( tq, name, attributes ), baseStruct( 0 ) {}
 	StructInstType( const Type::Qualifiers & tq, StructDecl * baseStruct, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
@@ -368,8 +373,4 @@
   private:
 	virtual std::string typeString() const;
-
-	// this decl is not "owned" by the struct inst; it is merely a pointer to elsewhere in the tree,
-	// where the structure used in this type is actually defined
-	StructDecl *baseStruct;
 };
 
@@ -377,4 +378,8 @@
 	typedef ReferenceToType Parent;
   public:
+	// this decl is not "owned" by the union inst; it is merely a pointer to elsewhere in the tree,
+	// where the union used in this type is actually defined
+	UnionDecl *baseUnion;
+
 	UnionInstType( const Type::Qualifiers & tq, const std::string & name, const std::list< Attribute * > & attributes = std::list< Attribute * >()  ) : Parent( tq, name, attributes ), baseUnion( 0 ) {}
 	UnionInstType( const Type::Qualifiers & tq, UnionDecl * baseUnion, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
@@ -400,13 +405,13 @@
   private:
 	virtual std::string typeString() const;
-
+};
+
+class EnumInstType : public ReferenceToType {
+	typedef ReferenceToType Parent;
+  public:
 	// this decl is not "owned" by the union inst; it is merely a pointer to elsewhere in the tree,
 	// where the union used in this type is actually defined
-	UnionDecl *baseUnion;
-};
-
-class EnumInstType : public ReferenceToType {
-	typedef ReferenceToType Parent;
-  public:
+	EnumDecl *baseEnum = nullptr;
+
 	EnumInstType( const Type::Qualifiers & tq, const std::string & name, const std::list< Attribute * > & attributes = std::list< Attribute * >()  ) : Parent( tq, name, attributes ) {}
 	EnumInstType( const Type::Qualifiers & tq, EnumDecl * baseEnum, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
@@ -423,8 +428,4 @@
   private:
 	virtual std::string typeString() const;
-
-	// this decl is not "owned" by the union inst; it is merely a pointer to elsewhere in the tree,
-	// where the union used in this type is actually defined
-	EnumDecl *baseEnum = nullptr;
 };
 
@@ -432,4 +433,8 @@
 	typedef ReferenceToType Parent;
   public:
+	// this member is filled in by the validate pass, which instantiates the members of the correponding
+	// aggregate with the actual type parameters specified for this use of the context
+	std::list< Declaration* > members;
+
 	TraitInstType( const Type::Qualifiers & tq, const std::string & name, const std::list< Attribute * > & attributes = std::list< Attribute * >()  ) : Parent( tq, name, attributes ) {}
 	TraitInstType( const TraitInstType & other );
@@ -445,8 +450,4 @@
   private:
 	virtual std::string typeString() const;
-
-	// this member is filled in by the validate pass, which instantiates the members of the correponding
-	// aggregate with the actual type parameters specified for this use of the context
-	std::list< Declaration* > members;
 };
 
@@ -454,4 +455,9 @@
 	typedef ReferenceToType Parent;
   public:
+	// this decl is not "owned" by the type inst; it is merely a pointer to elsewhere in the tree,
+	// where the type used here is actually defined
+	TypeDecl *baseType;
+	bool isFtype;
+
 	TypeInstType( const Type::Qualifiers & tq, const std::string & name, TypeDecl *baseType, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
 	TypeInstType( const Type::Qualifiers & tq, const std::string & name, bool isFtype, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
@@ -472,12 +478,11 @@
   private:
 	virtual std::string typeString() const;
-	// this decl is not "owned" by the type inst; it is merely a pointer to elsewhere in the tree,
-	// where the type used here is actually defined
-	TypeDecl *baseType;
-	bool isFtype;
 };
 
 class TupleType : public Type {
   public:
+	std::list<Type *> types;
+	std::list<Declaration *> members;
+
 	TupleType( const Type::Qualifiers & tq, const std::list< Type * > & types, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
 	TupleType( const TupleType& );
@@ -508,11 +513,10 @@
 	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	std::list<Type *> types;
-	std::list<Declaration *> members;
 };
 
 class TypeofType : public Type {
   public:
+	Expression *expr;
+
 	TypeofType( const Type::Qualifiers & tq, Expression *expr, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
 	TypeofType( const TypeofType& );
@@ -528,10 +532,13 @@
 	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
+};
+
+class AttrType : public Type {
+  public:
+	std::string name;
 	Expression *expr;
-};
-
-class AttrType : public Type {
-  public:
+	Type *type;
+	bool isType;
+
 	AttrType( const Type::Qualifiers & tq, const std::string & name, Expression *expr, const std::list< Attribute * > & attributes = std::list< Attribute * >() );
 	AttrType( const Type::Qualifiers & tq, const std::string & name, Type *type, const std::list< Attribute * > & attributes = std::list< Attribute * >()  );
@@ -554,9 +561,4 @@
 	virtual Type *acceptMutator( Mutator & m ) { return m.mutate( this ); }
 	virtual void print( std::ostream & os, int indent = 0 ) const;
-  private:
-	std::string name;
-	Expression *expr;
-	Type *type;
-	bool isType;
 };
 
Index: src/SynTree/TypeDecl.cc
===================================================================
--- src/SynTree/TypeDecl.cc	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/SynTree/TypeDecl.cc	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -9,7 +9,7 @@
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Mar 16 07:49:58 2017
-// Update Count     : 5
+// Last Modified By : Andrew Beach
+// Last Modified On : Wed Aug  9 14:35:00 2017
+// Update Count     : 6
 //
 
@@ -18,8 +18,8 @@
 #include "Common/utility.h"
 
-TypeDecl::TypeDecl( const std::string &name, Type::StorageClasses scs, Type *type, Kind kind, Type * init ) : Parent( name, scs, type ), kind( kind ), init( init ), sized( kind == Any || kind == Ttype ) {
+TypeDecl::TypeDecl( const std::string &name, Type::StorageClasses scs, Type *type, Kind kind, Type * init ) : Parent( name, scs, type ), init( init ), sized( kind == Any || kind == Ttype ), kind( kind ) {
 }
 
-TypeDecl::TypeDecl( const TypeDecl &other ) : Parent( other ), kind( other.kind ), init( maybeClone( other.init ) ), sized( other.sized ) {
+TypeDecl::TypeDecl( const TypeDecl &other ) : Parent( other ), init( maybeClone( other.init ) ), sized( other.sized ), kind( other.kind ) {
 }
 
Index: src/SynTree/TypeExpr.cc
===================================================================
--- src/SynTree/TypeExpr.cc	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/SynTree/TypeExpr.cc	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -21,5 +21,5 @@
 }
 
-TypeExpr::TypeExpr( const TypeExpr &other ) : type( maybeClone( other.type ) ) {
+TypeExpr::TypeExpr( const TypeExpr &other ) : Expression( other ), type( maybeClone( other.type ) ) {
 }
 
Index: src/Tuples/TupleExpansion.cc
===================================================================
--- src/Tuples/TupleExpansion.cc	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/Tuples/TupleExpansion.cc	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -66,16 +66,9 @@
 		};
 
-		class TupleTypeReplacer : public GenPoly::DeclMutator {
-		  public:
-			typedef GenPoly::DeclMutator Parent;
-			using Parent::mutate;
-
-			virtual Type * mutate( TupleType * tupleType ) override;
-
-			virtual CompoundStmt * mutate( CompoundStmt * stmt ) override {
-				typeMap.beginScope();
-				stmt = Parent::mutate( stmt );
-				typeMap.endScope();
-				return stmt;
+		struct TupleTypeReplacer : public WithDeclsToAdd, public WithGuards, public WithTypeSubstitution {
+			Type * postmutate( TupleType * tupleType );
+
+			void premutate( CompoundStmt * ) {
+				GuardScope( typeMap );
 			}
 		  private:
@@ -111,6 +104,6 @@
 		mutateAll( translationUnit, assnExpander );
 
-		TupleTypeReplacer replacer;
-		replacer.mutateDeclarationList( translationUnit );
+		PassVisitor<TupleTypeReplacer> replacer;
+		mutateAll( translationUnit, replacer );
 
 		PassVisitor<TupleIndexExpander> idxExpander;
@@ -218,6 +211,5 @@
 	}
 
-	Type * TupleTypeReplacer::mutate( TupleType * tupleType ) {
-		tupleType = safe_dynamic_cast< TupleType * > ( Parent::mutate( tupleType ) );
+	Type * TupleTypeReplacer::postmutate( TupleType * tupleType ) {
 		unsigned tupleSize = tupleType->size();
 		if ( ! typeMap.count( tupleSize ) ) {
@@ -226,5 +218,5 @@
 			decl->set_body( true );
 			for ( size_t i = 0; i < tupleSize; ++i ) {
-				TypeDecl * tyParam = new TypeDecl( toString( "tuple_param_", i ), Type::StorageClasses(), nullptr, TypeDecl::Any );
+				TypeDecl * tyParam = new TypeDecl( toString( "tuple_param_", tupleSize, "_", i ), Type::StorageClasses(), nullptr, TypeDecl::Any );
 				decl->get_members().push_back( new ObjectDecl( toString("field_", i ), Type::StorageClasses(), LinkageSpec::C, nullptr, new TypeInstType( Type::Qualifiers(), tyParam->get_name(), tyParam ), nullptr ) );
 				decl->get_parameters().push_back( tyParam );
@@ -235,5 +227,5 @@
 			}
 			typeMap[tupleSize] = decl;
-			addDeclaration( decl );
+			declsToAddBefore.push_back( decl );
 		}
 		Type::Qualifiers qualifiers = tupleType->get_qualifiers();
@@ -241,6 +233,13 @@
 		StructDecl * decl = typeMap[tupleSize];
 		StructInstType * newType = new StructInstType( qualifiers, decl );
-		for ( Type * t : *tupleType ) {
+		for ( auto p : group_iterate( tupleType->get_types(), decl->get_parameters() ) ) {
+			Type * t = std::get<0>(p);
+			TypeDecl * td = std::get<1>(p);
 			newType->get_parameters().push_back( new TypeExpr( t->clone() ) );
+			if ( env ) {
+				// add bindings to the type environment.
+				// xxx - This may not be sufficient, it may be necessary to rename type variables on StructInstType?
+				env->add( td->get_name(), t->clone() );
+			}
 		}
 		delete tupleType;
Index: src/Virtual/ExpandCasts.cc
===================================================================
--- src/Virtual/ExpandCasts.cc	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/Virtual/ExpandCasts.cc	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -10,6 +10,6 @@
 // Created On       : Mon Jul 24 13:59:00 2017
 // Last Modified By : Andrew Beach
-// Last Modified On : Wed Jul 26 14:16:00 2017
-// Update Count     : 0
+// Last Modified On : Tus Aug  2 14:59:00 2017
+// Update Count     : 1
 //
 
@@ -78,5 +78,5 @@
 
 	void VirtualCastCore::premutate( FunctionDecl * functionDecl ) {
-		if ( (! vcast_decl) && functionDecl->get_statements() &&
+		if ( (! vcast_decl) &&
 		     functionDecl->get_name() == "__cfa__virtual_cast" ) {
 			vcast_decl = functionDecl;
@@ -101,16 +101,19 @@
 		assertf( castExpr->get_result(), "Virtual Cast target not found before expansion." );
 
-		//assert( vcast_decl );
+		assert( vcast_decl );
 		assert( pvt_decl );
 
 		// May only cast to a pointer or reference type.
 		// A earlier validation should give a syntax error, this is
-		// just to make sure errors don't creep in.
+		// just to make sure errors don't creep during translation.
+		// Move to helper with more detailed error messages.
 		PointerType * target_type =
 			dynamic_cast<PointerType *>( castExpr->get_result() );
-        assert( target_type );
+		assert( target_type );
 
 		StructInstType * target_struct =
 			dynamic_cast<StructInstType *>( target_type->get_base() );
+		assert( target_struct );
+
 		StructDecl * target_decl = target_struct->get_baseStruct();
 
@@ -124,16 +127,22 @@
 
 		Expression * result = new CastExpr(
-			//new ApplicationExpr( new VariableExpr( vcast_decl ), {
+			//new ApplicationExpr(
+				//new AddressExpr( new VariableExpr( vcast_decl ) ),
+				//new CastExpr( new VariableExpr( vcast_decl ),
+				//	new PointerType( noQualifiers,
+				//		vcast_decl->get_type()->clone()
+				//		)
+				//	),
 			new UntypedExpr( new NameExpr( "__cfa__virtual_cast" ), {
-				new CastExpr(
-					new AddressExpr( new VariableExpr( table ) ),
-					pointer_to_pvt(1)
-					),
-				new CastExpr(
-					castExpr->get_arg(),
-					pointer_to_pvt(2)
-					) }
-				),
-			castExpr->get_result()
+					new CastExpr(
+						new AddressExpr( new VariableExpr( table ) ),
+						pointer_to_pvt(1)
+						),
+					new CastExpr(
+						castExpr->get_arg(),
+						pointer_to_pvt(2)
+						)
+				} ),
+			castExpr->get_result()->clone()
 			);
 
Index: src/driver/cfa.cc
===================================================================
--- src/driver/cfa.cc	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/driver/cfa.cc	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -10,6 +10,6 @@
 // Created On       : Tue Aug 20 13:44:49 2002
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Jul 20 15:54:45 2017
-// Update Count     : 156
+// Last Modified On : Fri Jan 20 14:38:45 2017
+// Update Count     : 155
 //
 
@@ -76,4 +76,5 @@
 	bool cpp_flag = false;								// -E or -M flag, preprocessor only
 	bool std_flag = false;								// -std= flag
+	bool noincstd_flag = false;							// -no-include-stdhdr= flag
 	bool debugging __attribute(( unused )) = false;		// -g flag
 
@@ -133,4 +134,6 @@
 			} else if ( arg == "-nohelp" ) {
 				help = false;							// strip the nohelp flag
+			} else if ( arg == "-no-include-stdhdr" ) {
+				noincstd_flag = true;					// strip the no-include-stdhdr flag
 			} else if ( arg == "-compiler" ) {
 				// use the user specified compiler
@@ -231,6 +234,8 @@
 	args[nargs] = "-I" CFA_INCDIR;
 	nargs += 1;
-	args[nargs] = "-I" CFA_INCDIR "/stdhdr";
-	nargs += 1;
+	if ( ! noincstd_flag ) {							// do not use during build
+		args[nargs] = "-I" CFA_INCDIR "/stdhdr";
+		nargs += 1;
+	} // if
 	args[nargs] = "-I" CFA_INCDIR "/concurrency";
 	nargs += 1;
Index: c/include/assert.h
===================================================================
--- src/include/assert.h	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ 	(revision )
@@ -1,39 +1,0 @@
-//
-// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
-//
-// The contents of this file are covered under the licence agreement in the
-// file "LICENCE" distributed with Cforall.
-//
-// assert.h --
-//
-// Author           : Peter A. Buhr
-// Created On       : Thu Aug 18 13:19:26 2016
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Aug 18 13:25:55 2016
-// Update Count     : 4
-//
-
-#pragma once
-// Pragmas for header cleanup tool
-// IWYU pragma: private, include <cassert>
-
-#include_next <assert.h>
-
-#define __STRINGIFY__(str) #str
-#define __VSTRINGIFY__(str) __STRINGIFY__(str)
-#define assertf(expr, fmt, ...) ((expr) ? static_cast<void>(0) : __assert_fail_f(__VSTRINGIFY__(expr), __FILE__, __LINE__, __PRETTY_FUNCTION__, fmt, ## __VA_ARGS__ ))
-
-void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... ) __attribute__((noreturn));
-
-template<typename T, typename U>
-static inline T safe_dynamic_cast(const U& src) {
-	T ret = dynamic_cast<T>(src);
-	assert(ret);
-	return ret;
-}
-
-// Local Variables: //
-// tab-width: 4 //
-// mode: c++ //
-// compile-command: "make install" //
-// End: //
Index: src/include/cassert
===================================================================
--- src/include/cassert	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
+++ src/include/cassert	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -0,0 +1,51 @@
+//
+// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+//
+// assert.h --
+//
+// Author           : Peter A. Buhr
+// Created On       : Thu Aug 18 13:19:26 2016
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Tue Aug  1 11:56:01 2017
+// Update Count     : 16
+//
+
+#pragma once
+// Pragmas for header cleanup tool
+// IWYU pragma: private, include <cassert>
+
+#include_next <cassert>
+
+#ifdef NDEBUG
+
+#define assertf(expr, fmt, ...) (__ASSERT_VOID_ASSERT (0))
+
+#else
+
+#define assertf(expr, fmt, ...) ((expr) \
+	? (__ASSERT_VOID_CAST (0)) \
+	: __assert_fail_f( #expr, __FILE__, __LINE__, \
+	__ASSERT_FUNCTION, fmt, ## __VA_ARGS__ ))
+
+void __assert_fail_f( 	const char *assertion, const char *file, 
+						unsigned int line, const char *function, 
+						const char *fmt, ... 
+	) __attribute__((noreturn, format(printf, 5, 6)));
+
+#endif
+
+template<typename T, typename U>
+static inline T safe_dynamic_cast( const U & src ) {
+	T ret = dynamic_cast<T>(src);
+	assert(ret);
+	return ret;
+}
+
+// Local Variables: //
+// tab-width: 4 //
+// mode: c++ //
+// compile-command: "make install" //
+// End: //
Index: src/libcfa/Makefile.am
===================================================================
--- src/libcfa/Makefile.am	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/libcfa/Makefile.am	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -39,5 +39,9 @@
 
 AM_CCASFLAGS = @CFA_FLAGS@
-CFLAGS = -quiet -I${abs_top_srcdir}/src/libcfa/stdhdr -XCFA -t -B${abs_top_srcdir}/src/driver ${EXTRA_FLAGS}
+
+#CFLAGS for most libcfa src
+#use -no-include-stdhdr to prevent rebuild cycles
+#The built sources must not depend on the installed headers
+CFLAGS = -quiet -no-include-stdhdr -I${abs_top_srcdir}/src/libcfa/stdhdr -XCFA -t -B${abs_top_srcdir}/src/driver ${EXTRA_FLAGS}
 CC = ${abs_top_srcdir}/src/driver/cfa
 
Index: src/libcfa/Makefile.in
===================================================================
--- src/libcfa/Makefile.in	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/libcfa/Makefile.in	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -308,5 +308,9 @@
 CFA_NAME = @CFA_NAME@
 CFA_PREFIX = @CFA_PREFIX@
-CFLAGS = -quiet -I${abs_top_srcdir}/src/libcfa/stdhdr -XCFA -t -B${abs_top_srcdir}/src/driver ${EXTRA_FLAGS}
+
+#CFLAGS for most libcfa src
+#use -no-include-stdhdr to prevent rebuild cycles
+#The built sources must not depend on the installed headers
+CFLAGS = -quiet -no-include-stdhdr -I${abs_top_srcdir}/src/libcfa/stdhdr -XCFA -t -B${abs_top_srcdir}/src/driver ${EXTRA_FLAGS}
 CPP = @CPP@
 CPPFLAGS = @CPPFLAGS@
Index: src/libcfa/concurrency/monitor.c
===================================================================
--- src/libcfa/concurrency/monitor.c	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/libcfa/concurrency/monitor.c	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -10,6 +10,6 @@
 // Created On       : Thd Feb 23 12:27:26 2017
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Jul 21 22:37:11 2017
-// Update Count     : 1
+// Last Modified On : Mon Jul 31 14:59:05 2017
+// Update Count     : 3
 //
 
@@ -484,5 +484,5 @@
 	if( !this->monitors ) {
 		// LIB_DEBUG_PRINT_SAFE("Branding\n");
-		assertf( thrd->current_monitors != NULL, "No current monitor to brand condition", thrd->current_monitors );
+		assertf( thrd->current_monitors != NULL, "No current monitor to brand condition %p", thrd->current_monitors );
 		this->monitor_count = thrd->current_monitor_count;
 
Index: src/libcfa/exception.c
===================================================================
--- src/libcfa/exception.c	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/libcfa/exception.c	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -9,8 +9,10 @@
 // Author           : Andrew Beach
 // Created On       : Mon Jun 26 15:13:00 2017
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Jul 26 10:37:51 2017
-// Update Count     : 2
+// Last Modified By : Andrew Beach
+// Last Modified On : Fri Aug  4 15:20:00 2017
+// Update Count     : 6
 //
+
+#include <stddef.h> // for size_t
 
 #include "exception.h"
@@ -32,13 +34,36 @@
 #include "lsda.h"
 
+
+// Base exception vtable is abstract, you should not have base exceptions.
+struct __cfaehm__base_exception_t_vtable
+		___cfaehm__base_exception_t_vtable_instance = {
+	.parent = NULL,
+	.size = 0,
+	.copy = NULL,
+	.free = NULL,
+	.msg = NULL
+};
+
+
 // Temperary global exception context. Does not work with concurency.
-struct shared_stack_t {
+struct exception_context_t {
     struct __cfaehm__try_resume_node * top_resume;
     struct __cfaehm__try_resume_node * current_resume;
 
-    exception current_exception;
+    exception * current_exception;
     int current_handler_index;
 } shared_stack = {NULL, NULL, 0, 0};
 
+// Get the current exception context.
+// There can be a single global until multithreading occurs, then each stack
+// needs its own. It will have to be updated to handle that.
+struct exception_context_t * this_exception_context() {
+	return &shared_stack;
+}
+//#define SAVE_EXCEPTION_CONTEXT(to_name)
+//struct exception_context_t * to_name = this_exception_context();
+//exception * this_exception() {
+//    return this_exception_context()->current_exception;
+//}
 
 
@@ -55,5 +80,5 @@
 
 	// DEBUG
-	printf("Throwing resumption exception %d\n", *except);
+	printf("Throwing resumption exception\n");
 
 	struct __cfaehm__try_resume_node * original_head = shared_stack.current_resume;
@@ -69,5 +94,5 @@
 	}
 
-	printf("Unhandled exception %d\n", *except);
+	printf("Unhandled exception\n");
 	shared_stack.current_resume = original_head;
 
@@ -94,8 +119,68 @@
 // TERMINATION ===============================================================
 
-// Requires -fexceptions to work.
-
-// Global which defines the current exception.  Currently an int just to make matching easier.
-//int this_exception; (became shared_stack.current_exception)
+// MEMORY MANAGEMENT (still for integers)
+// May have to move to cfa for constructors and destructors (references).
+
+struct __cfaehm__node {
+	struct __cfaehm__node * next;
+};
+
+#define NODE_TO_EXCEPT(node) ((exception *)(1 + (node)))
+#define EXCEPT_TO_NODE(except) ((struct __cfaehm__node *)(except) - 1)
+
+// Creates a copy of the indicated exception and sets current_exception to it.
+static void __cfaehm__allocate_exception( exception * except ) {
+	struct exception_context_t * context = this_exception_context();
+
+	// Allocate memory for the exception.
+	struct __cfaehm__node * store = malloc(
+		sizeof( struct __cfaehm__node ) + except->virtual_table->size );
+
+	if ( ! store ) {
+		// Failure: cannot allocate exception. Terminate thread.
+		abort(); // <- Although I think it might be the process.
+	}
+
+	// Add the node to the list:
+	store->next = EXCEPT_TO_NODE(context->current_exception);
+	context->current_exception = NODE_TO_EXCEPT(store);
+
+	// Copy the exception to storage.
+	except->virtual_table->copy( context->current_exception, except );
+}
+
+// Delete the provided exception, unsetting current_exception if relivant.
+static void __cfaehm__delete_exception( exception * except ) {
+	struct exception_context_t * context = this_exception_context();
+
+	// DEBUG
+	printf( "Deleting Exception\n");
+
+	// Remove the exception from the list.
+	struct __cfaehm__node * to_free = EXCEPT_TO_NODE(except);
+	struct __cfaehm__node * node;
+
+	if ( context->current_exception == except ) {
+		node = to_free->next;
+		context->current_exception = (node) ? NODE_TO_EXCEPT(node) : 0;
+	} else {
+		node = EXCEPT_TO_NODE(context->current_exception);
+		// It may always be in the first or second position.
+		while( to_free != node->next ) {
+			node = node->next;
+		}
+		node->next = to_free->next;
+	}
+
+	// Free the old exception node.
+	except->virtual_table->free( except );
+	free( to_free );
+}
+
+// If this isn't a rethrow (*except==0), delete the provided exception.
+void __cfaehm__cleanup_terminate( void * except ) {
+	if ( *(void**)except ) __cfaehm__delete_exception( *(exception**)except );
+}
+
 
 // We need a piece of storage to raise the exception
@@ -117,10 +202,11 @@
 }
 
-void __cfaehm__throw_terminate( exception * val ) {
-	// Store the current exception
-	shared_stack.current_exception = *val;
-
-	// DEBUG
-	printf("Throwing termination exception %d\n", *val);
+// The exception that is being thrown must already be stored.
+__attribute__((noreturn)) void __cfaehm__begin_unwind(void) {
+	if ( ! this_exception_context()->current_exception ) {
+		printf("UNWIND ERROR missing exception in begin unwind\n");
+		abort();
+	}
+
 
 	// Call stdlibc to raise the exception
@@ -148,10 +234,17 @@
 }
 
-// Nesting this the other way would probably be faster.
+void __cfaehm__throw_terminate( exception * val ) {
+	// DEBUG
+	printf("Throwing termination exception\n");
+
+	__cfaehm__allocate_exception( val );
+	__cfaehm__begin_unwind();
+}
+
 void __cfaehm__rethrow_terminate(void) {
 	// DEBUG
 	printf("Rethrowing termination exception\n");
 
-	__cfaehm__throw_terminate(&shared_stack.current_exception);
+	__cfaehm__begin_unwind();
 }
 
@@ -263,5 +356,5 @@
 					_Unwind_Reason_Code (*matcher)(exception *) =
 						MATCHER_FROM_CONTEXT(context);
-					int index = matcher(&shared_stack.current_exception);
+					int index = matcher(shared_stack.current_exception);
 					_Unwind_Reason_Code ret = (0 == index)
 						? _URC_CONTINUE_UNWIND : _URC_HANDLER_FOUND;
@@ -359,5 +452,5 @@
 	// Exception handler
 	catch_block( shared_stack.current_handler_index,
-	            &shared_stack.current_exception );
+	             shared_stack.current_exception );
 }
 
Index: src/libcfa/exception.h
===================================================================
--- src/libcfa/exception.h	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/libcfa/exception.h	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -9,17 +9,32 @@
 // Author           : Andrew Beach
 // Created On       : Mon Jun 26 15:11:00 2017
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Jul 22 09:57:02 2017
-// Update Count     : 3
+// Last Modified By : Andrew Beach
+// Last Modified On : Fri Aug  4 15:20:00 2017
+// Update Count     : 5
 //
 
 #pragma once
 
-// Later to be a special structure type.
-typedef int exception;
 
 #ifdef __CFORALL__
 extern "C" {
 #endif
+
+struct __cfaehm__base_exception_t;
+typedef struct __cfaehm__base_exception_t exception;
+struct __cfaehm__base_exception_t_vtable {
+	const struct __cfaehm__base_exception_t_vtable * parent;
+	size_t size;
+	void (*copy)(struct __cfaehm__base_exception_t *this,
+	             struct __cfaehm__base_exception_t * other);
+	void (*free)(struct __cfaehm__base_exception_t *this);
+	const char (*msg)(struct __cfaehm__base_exception_t *this);
+};
+struct __cfaehm__base_exception_t {
+	struct __cfaehm__base_exception_t_vtable const * virtual_table;
+};
+extern struct __cfaehm__base_exception_t_vtable
+	___cfaehm__base_exception_t_vtable_instance;
+
 
 // Used in throw statement translation.
@@ -34,4 +49,7 @@
     int (*match_block)(exception * except));
 
+// Clean-up the exception in catch blocks.
+void __cfaehm__cleanup_terminate(void * except);
+
 // Data structure creates a list of resume handlers.
 struct __cfaehm__try_resume_node {
@@ -40,4 +58,5 @@
 };
 
+// These act as constructor and destructor for the resume node.
 void __cfaehm__try_resume_setup(
     struct __cfaehm__try_resume_node * node,
@@ -47,6 +66,5 @@
 
 // Check for a standard way to call fake deconstructors.
-struct __cfaehm__cleanup_hook {
-};
+struct __cfaehm__cleanup_hook {};
 
 #ifdef __CFORALL__
Index: src/libcfa/iostream
===================================================================
--- src/libcfa/iostream	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/libcfa/iostream	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Jul  7 08:35:59 2017
-// Update Count     : 118
+// Last Modified On : Wed Aug  9 16:42:47 2017
+// Update Count     : 131
 //
 
@@ -46,6 +46,10 @@
 }; // ostream
 
-trait writeable( otype T ) {
-	forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, T );
+// trait writeable( otype T ) {
+// 	forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, T );
+// }; // writeable
+
+trait writeable( otype T, dtype ostype | ostream( ostype ) ) {
+	ostype * ?|?( ostype *, T );
 }; // writeable
 
@@ -77,5 +81,6 @@
 
 // tuples
-forall( dtype ostype, otype T, ttype Params | ostream( ostype ) | writeable( T ) | { ostype * ?|?( ostype *, Params ); } ) ostype * ?|?( ostype * os, T arg, Params rest );
+forall( dtype ostype, otype T, ttype Params | writeable( T, ostype ) | { ostype * ?|?( ostype *, Params ); } )
+ostype * ?|?( ostype * os, T arg, Params rest );
 
 // manipulators
@@ -90,9 +95,9 @@
 
 // writes the range [begin, end) to the given stream
-forall( otype elt_type | writeable( elt_type ), otype iterator_type | iterator( iterator_type, elt_type ), dtype os_type | ostream( os_type ) )
-void write( iterator_type begin, iterator_type end, os_type *os );
+forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) )
+void write( iterator_type begin, iterator_type end, ostype * os );
 
-forall( otype elt_type | writeable( elt_type ), otype iterator_type | iterator( iterator_type, elt_type ), dtype os_type | ostream( os_type ) )
-void write_reverse( iterator_type begin, iterator_type end, os_type *os );
+forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) )
+void write_reverse( iterator_type begin, iterator_type end, ostype * os );
 
 //---------------------------------------
Index: src/libcfa/iostream.c
===================================================================
--- src/libcfa/iostream.c	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/libcfa/iostream.c	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -10,6 +10,6 @@
 // Created On       : Wed May 27 17:56:53 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sun Jul 16 21:12:03 2017
-// Update Count     : 398
+// Last Modified On : Wed Aug  9 16:46:51 2017
+// Update Count     : 401
 //
 
@@ -193,5 +193,5 @@
 
 // tuples
-forall( dtype ostype, otype T, ttype Params | ostream( ostype ) | writeable( T ) | { ostype * ?|?( ostype *, Params ); } )
+forall( dtype ostype, otype T, ttype Params | writeable( T, ostype ) | { ostype * ?|?( ostype *, Params ); } )
 ostype * ?|?( ostype * os, T arg, Params rest ) {
 	os | arg;											// print first argument
@@ -256,13 +256,13 @@
 //---------------------------------------
 
-forall( otype elttype | writeable( elttype ), otype iteratortype | iterator( iteratortype, elttype ), dtype ostype | ostream( ostype ) )
-void write( iteratortype begin, iteratortype end, ostype * os ) {
-	void print( elttype i ) { os | i; }
+forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) )
+void write( iterator_type begin, iterator_type end, ostype * os ) {
+	void print( elt_type i ) { os | i; }
 	for_each( begin, end, print );
 } // ?|?
 
-forall( otype elttype | writeable( elttype ), otype iteratortype | iterator( iteratortype, elttype ), dtype ostype | ostream( ostype ) )
-void write_reverse( iteratortype begin, iteratortype end, ostype * os ) {
-	void print( elttype i ) { os | i; }
+forall( dtype ostype, otype elt_type | writeable( elt_type, ostype ), otype iterator_type | iterator( iterator_type, elt_type ) )
+void write_reverse( iterator_type begin, iterator_type end, ostype * os ) {
+	void print( elt_type i ) { os | i; }
 	for_each_reverse( begin, end, print );
 } // ?|?
Index: src/libcfa/math
===================================================================
--- src/libcfa/math	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/libcfa/math	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -10,6 +10,6 @@
 // Created On       : Mon Apr 18 23:37:04 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Jul 21 17:03:13 2017
-// Update Count     : 101
+// Last Modified On : Mon Aug  7 07:51:15 2017
+// Update Count     : 108
 //
 
@@ -18,4 +18,6 @@
 #include <math.h>
 #include <complex.h>
+
+//---------------------- General ----------------------
 
 static inline float ?%?( float x, float y ) { return fmodf( x, y ); }
@@ -37,11 +39,7 @@
 static inline [ int, long double ] remquo( long double x, long double y ) { int quo; x = remquol( x, y, &quo ); return [ quo, x ]; }
 
-// alternative name for remquo
-static inline float div( float x, float y, int * quo ) { return remquof( x, y, quo ); }
-static inline double div( double x, double y, int * quo ) { return remquo( x, y, quo ); }
-static inline long double div( long double x, long double y, int * quo ) { return remquol( x, y, quo ); }
-static inline [ int, float ] div( float x, float y ) { int quo; x = remquof( x, y, &quo ); return [ quo, x ]; }
-static inline [ int, double ] div( double x, double y ) { int quo; x = remquo( x, y, &quo ); return [ quo, x ]; }
-static inline [ int, long double ] div( long double x, long double y ) { int quo; x = remquol( x, y, &quo ); return [ quo, x ]; }
+static inline [ float, float ] div( float x, float y ) { y = modff( x / y, &x ); return [ x, y ]; }
+static inline [ double, double ] div( double x, double y ) { y = modf( x / y, &x ); return [ x, y ]; }
+static inline [ long double, long double ] div( long double x, long double y ) { y = modfl( x / y, &x ); return [ x, y ]; }
 
 static inline float fma( float x, float y, float z ) { return fmaf( x, y, z ); }
Index: src/libcfa/stdhdr/assert.h
===================================================================
--- src/libcfa/stdhdr/assert.h	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/libcfa/stdhdr/assert.h	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -10,6 +10,6 @@
 // Created On       : Mon Jul  4 23:25:26 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Jul 20 21:06:48 2017
-// Update Count     : 11
+// Last Modified On : Mon Jul 31 23:09:32 2017
+// Update Count     : 13
 // 
 
@@ -25,6 +25,7 @@
 	#define __STRINGIFY__(str) #str
 	#define __VSTRINGIFY__(str) __STRINGIFY__(str)
-	#define assertf(expr, fmt, ...) ((expr) ? ((void)0) : __assert_fail_f(__VSTRINGIFY__(expr), __FILE__, __LINE__, __PRETTY_FUNCTION__, fmt, ## __VA_ARGS__ ))
-	void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... ) __attribute__((noreturn));
+	#define assertf( expr, fmt, ... ) ((expr) ? ((void)0) : __assert_fail_f(__VSTRINGIFY__(expr), __FILE__, __LINE__, __PRETTY_FUNCTION__, fmt, ## __VA_ARGS__ ))
+
+	void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... ) __attribute__((noreturn, format( printf, 5, 6) ));
 #endif
 
Index: src/libcfa/stdlib
===================================================================
--- src/libcfa/stdlib	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/libcfa/stdlib	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -10,6 +10,6 @@
 // Created On       : Thu Jan 28 17:12:35 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Jul 20 14:32:37 2017
-// Update Count     : 220
+// Last Modified On : Mon Aug  7 11:19:07 2017
+// Update Count     : 223
 //
 
@@ -183,6 +183,9 @@
 //---------------------------------------
 
+[ int, int ] div( int num, int denom );
+[ long int, long int ] div( long int num, long int denom );
+[ long long int, long long int ] div( long long int num, long long int denom );
 forall( otype T | { T ?/?( T, T ); T ?%?( T, T ); } )
-[ T, T ] div( T t1, T t2 );
+[ T, T ] div( T num, T demon );
 
 //---------------------------------------
Index: src/libcfa/stdlib.c
===================================================================
--- src/libcfa/stdlib.c	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/libcfa/stdlib.c	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -10,6 +10,6 @@
 // Created On       : Thu Jan 28 17:10:29 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Jul 20 16:01:40 2017
-// Update Count     : 282
+// Last Modified On : Tue Aug  8 17:31:13 2017
+// Update Count     : 291
 //
 
@@ -255,6 +255,9 @@
 //---------------------------------------
 
+[ int, int ] div( int num, int denom ) { div_t qr = div( num, denom ); return [ qr.quot, qr.rem ]; }
+[ long int, long int ] div( long int num, long int denom ) { ldiv_t qr = ldiv( num, denom ); return [ qr.quot, qr.rem ]; }
+[ long long int, long long int ] div( long long int num, long long int denom ) { lldiv_t qr = lldiv( num, denom ); return [ qr.quot, qr.rem ]; }
 forall( otype T | { T ?/?( T, T ); T ?%?( T, T ); } )
-[ T, T ] div( T t1, T t2 ) { return [ t1 / t2, t1 % t2 ]; }
+[ T, T ] div( T num, T denom ) { return [ num / denom, num % denom ]; }
 
 //---------------------------------------
Index: src/tests/.expect/32/math.txt
===================================================================
--- src/tests/.expect/32/math.txt	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/tests/.expect/32/math.txt	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -2,5 +2,5 @@
 remainder:-1 -1 -1
 remquo:7 0.0999999 7 0.1 7 0.0999999999999999999
-div:7 0.0999999 7 0.1 7 0.0999999999999999999
+div:7, 0.2 7, 0.2 7, 0.2
 fma:-2 -2 -2
 fdim:2 2 2
@@ -55,5 +55,7 @@
 frexp:0.5 3 0.5 3 0.5 3
 ldexp:8 8 8
-modf:2 0.3 2 0.3 2 0.3 nextafter:2 2 2
+modf:2 0.3 2 0.3 2 0.3
+modf:2, 0.3 2, 0.3 2, 0.3
+nextafter:2 2 2
 nexttoward:2 2 2
 scalbn:16 16 16
Index: src/tests/.expect/64/math.txt
===================================================================
--- src/tests/.expect/64/math.txt	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/tests/.expect/64/math.txt	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -2,5 +2,5 @@
 remainder:-1 -1 -1
 remquo:7 0.0999999 7 0.1 7 0.0999999999999999999
-div:7 0.0999999 7 0.1 7 0.0999999999999999999
+div:7, 0.2 7, 0.2 7, 0.2
 fma:-2 -2 -2
 fdim:2 2 2
@@ -55,5 +55,7 @@
 frexp:0.5 3 0.5 3 0.5 3
 ldexp:8 8 8
-modf:2 0.3 2 0.3 2 0.3 nextafter:2 2 2
+modf:2 0.3 2 0.3 2 0.3
+modf:2, 0.3 2, 0.3 2, 0.3
+nextafter:2 2 2
 nexttoward:2 2 2
 scalbn:16 16 16
Index: src/tests/.expect/div.txt
===================================================================
--- src/tests/.expect/div.txt	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
+++ src/tests/.expect/div.txt	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -0,0 +1,3 @@
+div 2, 3 2, 3 2, 3
+div 2, 3
+div 2, 3
Index: src/tests/designations.c
===================================================================
--- src/tests/designations.c	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/tests/designations.c	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -9,7 +9,7 @@
 // Author           : Rob Schluntz
 // Created On       : Thu Jun 29 15:26:36 2017
-// Last Modified By : Rob Schluntz
-// Last Modified On : Thu Jun 29 15:27:05 2017
-// Update Count     : 2
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Thu Jul 27 11:46:35 2017
+// Update Count     : 3
 //
 
@@ -89,4 +89,17 @@
 };
 
+struct Fred {
+    double i[3];
+    int j;
+    struct Mary {
+	struct Jane {
+	    double j;
+	} j;
+	double i;
+    } m;
+};
+struct Fred s1 @= { .m.j : 3 };
+struct Fred s2 @= { .i : { [2] : 2 } };
+
 int main() {
 	// simple designation case - starting from beginning of structure, leaves ptr default-initialized (zero)
@@ -199,5 +212,6 @@
 	};
 #endif
-
+	// array designation
+	int i[2] = { [1] : 3 };
 	// allowed to have 'too many' initialized lists - essentially they are ignored.
 	int i1 = { 3 };
@@ -240,4 +254,7 @@
 	const char * str0 = "hello";
 	char str1[] = "hello";
+	const char c1[] = "abc";
+	const char c2[] = { 'a', 'b', 'c' };
+	const char c3[][2] = { { 'a', 'b' }, { 'c', 'd'}, { 'c', 'd'} };
 }
 
Index: src/tests/div.c
===================================================================
--- src/tests/div.c	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
+++ src/tests/div.c	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -0,0 +1,36 @@
+//                               -*- Mode: C -*- 
+// 
+// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
+//
+// The contents of this file are covered under the licence agreement in the
+// file "LICENCE" distributed with Cforall.
+// 
+// div.c -- 
+// 
+// Author           : Peter A. Buhr
+// Created On       : Tue Aug  8 16:28:43 2017
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Wed Aug  9 17:09:40 2017
+// Update Count     : 16
+// 
+
+#include <fstream>
+#include <stdlib>										// div
+
+struct T { int i; };
+T ?/?( T t1, T t2 ) { return t1.i / t2.i; }
+T ?%?( T t1, T t2 ) { return t1.i % t2.i; }
+ofstream * ?|?( ofstream * os, T t ) { return os | t.i; }
+
+int main( void ) {
+	sout | "div" | div( 13, 5 ) | div( 13L, 5L ) | div( 13LL, 5LL ) | endl;
+	short s1 = 13, s2 = 5;
+	sout | "div" | div( s1, s2 ) | endl;
+	T t1 = { 13 }, t2 = { 5 };
+	sout | "div" | div( t1, t2 ) | endl;				// polymorphic div
+} // main
+
+// Local Variables: //
+// tab-width: 4 //
+// compile-command: "cfa div.c" //
+// End: //
Index: src/tests/except-0.c
===================================================================
--- src/tests/except-0.c	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/tests/except-0.c	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -6,4 +6,5 @@
 #include <stdbool.h>
 
+// Local type to mark exits from scopes. (see ERROR)
 struct signal_exit {
 	const char * area;
@@ -19,5 +20,27 @@
 }
 
-void terminate(int except_value) {
+
+// Local Exception Types and manual vtable types.
+//#define TRIVIAL_EXCEPTION(name) //TRIVAL_EXCEPTION(yin)
+struct yin;
+struct yin_vtable {
+	struct exception_t_vtable const * parent;
+	size_t size;
+    void (*copy)(yin *this, yin * other);
+    void (*free)(yin *this);
+    const char (*msg)(yin *this);
+};
+struct yin {
+	struct yin_vtable const * parent;
+};
+void yin_msg(yin) {
+	return "in";
+}
+yin_vtable _yin_vtable_instance = {
+	&_exception_t_vtable_instance, sizeof(yin), ?{}, ^?{}, yin_msg
+}
+
+
+void terminate(exception * except_value) {
 	signal_exit a = {"terminate function"};
 	throw except_value;
@@ -25,5 +48,5 @@
 }
 
-void resume(int except_value) {
+void resume(exception * except_value) {
 	signal_exit a = {"resume function"};
 	throwResume except_value;
Index: src/tests/except-1.c
===================================================================
--- src/tests/except-1.c	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
+++ src/tests/except-1.c	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -0,0 +1,68 @@
+// Draft memory management test. (remember -fexceptions)
+
+#include <stdio.h>
+
+int main()
+{
+	try {
+		throw 3;
+	}
+	catch( 3 ) {
+		printf("First Caught\n");
+		try {
+			throw 4;
+		}
+		catch( 4 ) {
+			printf("Both Caught\n");
+		}
+	}
+	printf("Part A Complete\n");
+
+	try {
+		try {
+			throw 2;
+		}
+		catch( 2 ) {
+			printf("First Catch and rethrow\n");
+			throw;
+		}
+	}
+	catch( 2 ) {
+		printf("Second Catch\n");
+	}
+	printf("Part B Complete\n");
+
+	try {
+		try {
+			throw 5;
+		}
+		catch( 5 ) {
+			printf("Throw before cleanup\n");
+			throw 6;
+		}
+	}
+	catch( 6 ) {
+		printf("Catch after cleanup\n");
+	}
+	printf("Part C Complete\n");
+
+	try {
+		try {
+			throw 7;
+		}
+		catch( 7 ) {
+			printf("Caught initial throw.\n");
+			try {
+				throw 8;
+			}
+			catch( 8 ) {
+				printf("Caught intermediate throw.\n");
+			}
+			throw;
+		}
+	}
+	catch( 7 ) {
+		printf("Caught final throw.\n");
+	}
+	printf("Part D Complete\n");
+}
Index: src/tests/except-2.c
===================================================================
--- src/tests/except-2.c	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
+++ src/tests/except-2.c	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -0,0 +1,120 @@
+// New draft of exception tests.
+
+
+#include <string.h>
+
+// Local Exception Types and manual vtable types.
+#define BASE_EXCEPT __cfaehm__base_exception_t
+#define TABLE(name) name##_vtable
+#define INSTANCE(name) _##name##_vtable_instance
+#define TRIVIAL_EXCEPTION(name) \
+struct name; \
+struct TABLE(name) { \
+	struct __cfaehm__base_exception_t_vtable const * parent; \
+	size_t size; \
+	void (*copy)(name *this, name * other); \
+	void (*free)(name *this); \
+	const char * (*msg)(name *this); \
+}; \
+extern TABLE(name) INSTANCE(name); \
+struct name { \
+	struct TABLE(name) const * virtual_table; \
+}; \
+const char * name##_msg(name * this) { \
+	return #name; \
+} \
+void name##_copy(name * this, name * other) { \
+	this->virtual_table = other->virtual_table; \
+} \
+TABLE(name) INSTANCE(name) @= { \
+	.parent : &INSTANCE(__cfaehm__base_exception_t), \
+	.size : sizeof(name), .copy : name##_copy, \
+	.free : ^?{}, .msg : name##_msg \
+}; \
+void ?{}(name * this) { \
+	this->virtual_table = &INSTANCE(name); \
+}
+TRIVIAL_EXCEPTION(yin)
+TRIVIAL_EXCEPTION(yang)
+
+struct num_error;
+struct num_error_vtable {
+	struct exception_t_vtable const * parent;
+	size_t size;
+	void (*copy)(num_error *this, num_error * other);
+	void (*free)(num_error *this);
+	const char * (*msg)(num_error *this);
+	int (*code)(num_error *this);
+};
+extern num_error_vtable INSTANCE(num_error);
+struct num_error {
+	struct num_error_vtable const * virtual_table;
+	char * msg;
+	int num;
+};
+void num_error_msg(num_error * this) {
+	if ( ! this->msg ) {
+		const char * base = "Num Error with code: X";
+		this->msg = strdup( base );
+	}
+	this->msg[21] = '0' + this->num;
+	return this->msg;
+}
+void ?{}(num_error * this, int num) {
+	this->virtual_table = &_num_error_vtable_instance;
+	this->msg = 0;
+	this->num = num;
+}
+void ?{}(num_error * this, num_error * other) {
+	this->virtual_table = other->virtual_table;
+	this->msg = 0;
+	this->num = other->num;
+}
+void ^?{}(num_error * this) {
+	if( this->msg ) free( this->msg );
+}
+int num_error_code( num_error * this ) {
+	return this->num;
+}
+num_error_vtable _num_error_vtable_instance @= {
+	&___cfaehm__base_exception_t_vtable_instance,
+	sizeof(num_error), ?{}, ^?{},
+	num_error_msg, num_error_code
+};
+
+
+// Test simple throwing, matching and catching.
+void throw_catch() {
+	try {
+		yin black;
+		throw (BASE_EXCEPT *)&black;
+	} catch( yin * error ) {
+		printf("throw yin caught.\n");
+	}
+
+	try {
+		yang white;
+		throwResume (BASE_EXCEPT *)&white;
+		printf("> throwResume returned.\n");
+	} catchResume( yang * error ) {
+		printf("throwResume yang caught <");
+	}
+
+	/* Conditional catches are still a work in progress.
+	try {
+		num_error x = { 2 };
+		throw (struct exception_t *)&x;
+	}
+	catch (num_error * error0 ; 3 == error0->virtual_table->code( error0 ) ) {
+		printf("exception at %p\n", error0 );
+		printf("Should not be printed.\n");
+	}
+	catch (num_error * error1 ; 2 == error1->virtual_table->code( error1 ) ) {
+		printf("Should be printed.\n");
+	}*/
+}
+
+int main (int argc, char * argv[]) {
+	throw_catch();
+	return 0;
+}
Index: src/tests/math.c
===================================================================
--- src/tests/math.c	(revision 275f4b41090b65cafa0ee962bc45569b0ea89354)
+++ src/tests/math.c	(revision cd7ef0b8655058fe67f13fbc2fc0f2d8f8834997)
@@ -10,6 +10,6 @@
 // Created On       : Fri Apr 22 14:59:21 2016
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Fri Jul 21 10:32:04 2017
-// Update Count     : 73
+// Last Modified On : Wed Aug  9 07:20:49 2017
+// Update Count     : 77
 // 
 
@@ -31,10 +31,5 @@
 	l = remquo( 3.6L, 0.5L, &quot );
 	sout | quot | l | endl;
-	f = div( 3.6F, 0.5F, &quot );
-	sout | "div:" | quot | f;
-	d = div( 3.6D, 0.5F, &quot );
-	sout | quot | d;
-	l = div( 3.6L, 0.5L, &quot );
-	sout | quot | l | endl;
+	sout | "div:" | div( 3.6F, 0.5F ) | div( 3.6D, 0.5D ) | div( 3.6L, 0.5L ) | endl;
 	sout | "fma:" | fma( 3.0F, -1.0F, 1.0F ) | fma( 3.0D, -1.0D, 1.0D ) | fma( 3.0L, -1.0L, , 1.0L ) | endl;
 	sout | "fdim:" | fdim( 1.0F, -1.0F ) | fdim( 1.0D, -1.0D ) | fdim( 1.0L, -1.0L ) | endl;
@@ -137,5 +132,6 @@
 	sout | di | d;
 	l = modf( 2.3L, &ldi );
-	sout | ldi | l;
+	sout | ldi | l | endl;
+	sout | "modf:" | modf( 2.3F ) | modf( 2.3D ) | modf( 2.3L ) | endl;
 	sout | "nextafter:" | nextafter( 2.0F, 3.0F ) | nextafter( 2.0D, 3.0D ) | nextafter( 2.0L, 3.0L ) | endl;
 	sout | "nexttoward:" | nexttoward( 2.0F, 3.0F ) | nexttoward( 2.0D, 3.0D ) | nexttoward( 2.0L, 3.0L ) | endl;
