Index: src/Parser/DeclarationNode.cc
===================================================================
--- src/Parser/DeclarationNode.cc	(revision 926af747ff7dac04cacef082cdd822ede9e85c2d)
+++ src/Parser/DeclarationNode.cc	(revision 3b8e52c836b70faf7ced33547b03bc3cca997743)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 12:34:05 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Aug 16 18:00:34 2016
-// Update Count     : 179
+// Last Modified On : Wed Aug 17 11:08:56 2016
+// Update Count     : 180
 //
 
@@ -780,8 +780,5 @@
 
 DeclarationNode *DeclarationNode::appendList( DeclarationNode *node ) {
-	if ( node != 0 ) {
-		set_last( node );
-	} // if
-	return this;
+	return (DeclarationNode *)set_last( node );
 }
 
Index: src/Parser/LinkageSpec.cc
===================================================================
--- src/Parser/LinkageSpec.cc	(revision 926af747ff7dac04cacef082cdd822ede9e85c2d)
+++ src/Parser/LinkageSpec.cc	(revision 3b8e52c836b70faf7ced33547b03bc3cca997743)
@@ -9,7 +9,7 @@
 // Author           : Rodolfo G. Esteves
 // Created On       : Sat May 16 13:22:09 2015
-// Last Modified By : Rob Schluntz
-// Last Modified On : Wed Aug 19 15:53:05 2015
-// Update Count     : 5
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Wed Aug 17 23:02:37 2016
+// Update Count     : 11
 // 
 
@@ -31,46 +31,24 @@
 
 std::string LinkageSpec::toString( LinkageSpec::Type linkage ) {
-	switch ( linkage ) {
-	  case Intrinsic:
-		return "intrinsic";
-	  case Cforall:
-		return "Cforall";
-	  case C:
-		return "C";
-	  case AutoGen:
-		return "automatically generated";
-	  case Compiler:
-		return "compiler built-in";
-	}
-	assert( false );
-	return "";
+	static const char *linkageKinds[LinkageSpec::NoOfTypes] = {
+		"intrinsic", "Cforall", "C", "automatically generated", "compiler built-in",
+	};
+	return linkageKinds[linkage];
 }
 
 bool LinkageSpec::isDecoratable( Type t ) {
-	switch ( t ) {
-	  case Intrinsic:
-	  case Cforall:
-	  case AutoGen:
-		return true;
-	  case C:
-	  case Compiler:
-		return false;
-	}
-	assert( false );
-	return false;
+	static bool decoratable[LinkageSpec::NoOfTypes] = {
+		//	Intrinsic,	Cforall,	C,		AutoGen,	Compiler
+			true,		true,		false,	true,		false, 
+	};
+	return decoratable[ t ];
 }
 
 bool LinkageSpec::isGeneratable( Type t ) {
-	switch ( t ) {
-	  case Intrinsic:
-	  case Cforall:
-	  case AutoGen:
-	  case C:
-		return true;
-	  case Compiler:
-		return false;
-	}
-	assert( false );
-	return false;
+	static bool generatable[LinkageSpec::NoOfTypes] = {
+		//	Intrinsic,	Cforall,	C,		AutoGen,	Compiler
+			true,		true,		true,	true,		false, 
+	};
+	return generatable[ t ];
 }
 
@@ -81,29 +59,17 @@
 
 bool LinkageSpec::isOverridable( Type t ) {
-	switch ( t ) {
-	  case Intrinsic:
-	  case AutoGen:
-		return true;
-	  case Cforall:
-	  case C:
-	  case Compiler:
-		return false;
-	}
-	assert( false );
-	return false;
+	static bool overridable[LinkageSpec::NoOfTypes] = {
+		//	Intrinsic,	Cforall,	C,		AutoGen,	Compiler
+			true,		false,		false,	true,		false, 
+	};
+	return overridable[ t ];
 }
 
 bool LinkageSpec::isBuiltin( Type t ) {
-	switch ( t ) {
-	  case Cforall:
-	  case AutoGen:
-	  case C:
-		return false;
-	  case Intrinsic:
-	  case Compiler:
-		return true;
-	}
-	assert( false );
-	return false;
+	static bool builtin[LinkageSpec::NoOfTypes] = {
+		//	Intrinsic,	Cforall,	C,		AutoGen,	Compiler
+			true,		false,		false,	false,		true, 
+	};
+	return builtin[ t ];
 }
 
Index: src/Parser/LinkageSpec.h
===================================================================
--- src/Parser/LinkageSpec.h	(revision 926af747ff7dac04cacef082cdd822ede9e85c2d)
+++ src/Parser/LinkageSpec.h	(revision 3b8e52c836b70faf7ced33547b03bc3cca997743)
@@ -9,7 +9,7 @@
 // Author           : Rodolfo G. Esteves
 // Created On       : Sat May 16 13:24:28 2015
-// Last Modified By : Rob Schluntz
-// Last Modified On : Tue Aug 18 14:11:55 2015
-// Update Count     : 5
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Wed Aug 17 22:19:48 2016
+// Update Count     : 6
 //
 
@@ -25,5 +25,6 @@
 		C,												// not overloadable, not mangled
 		AutoGen,										// built by translator (struct assignment)
-		Compiler										// gcc internal
+		Compiler,										// gcc internal
+		NoOfTypes
 	};
   
Index: src/Parser/parser.cc
===================================================================
--- src/Parser/parser.cc	(revision 926af747ff7dac04cacef082cdd822ede9e85c2d)
+++ src/Parser/parser.cc	(revision 3b8e52c836b70faf7ced33547b03bc3cca997743)
@@ -7801,5 +7801,5 @@
 #line 1993 "parser.yy"
     {
-			linkageStack.push( linkage );
+			linkageStack.push( linkage );				// handle nested extern "C"/"Cforall"
 			linkage = LinkageSpec::fromString( *(yyvsp[(2) - (2)].tok) );
 		}
Index: src/Parser/parser.yy
===================================================================
--- src/Parser/parser.yy	(revision 926af747ff7dac04cacef082cdd822ede9e85c2d)
+++ src/Parser/parser.yy	(revision 3b8e52c836b70faf7ced33547b03bc3cca997743)
@@ -10,6 +10,6 @@
 // Created On       : Sat Sep  1 20:22:55 2001
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Aug 16 21:59:35 2016
-// Update Count     : 1907
+// Last Modified On : Wed Aug 17 11:18:40 2016
+// Update Count     : 1908
 //
 
@@ -1992,5 +1992,5 @@
 	| EXTERN STRINGliteral
 		{
-			linkageStack.push( linkage );
+			linkageStack.push( linkage );				// handle nested extern "C"/"Cforall"
 			linkage = LinkageSpec::fromString( *$2 );
 		}
Index: src/main.cc
===================================================================
--- src/main.cc	(revision 926af747ff7dac04cacef082cdd822ede9e85c2d)
+++ src/main.cc	(revision 3b8e52c836b70faf7ced33547b03bc3cca997743)
@@ -10,6 +10,6 @@
 // Created On       : Fri May 15 23:12:02 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Aug 17 09:08:43 2016
-// Update Count     : 274
+// Last Modified On : Wed Aug 17 22:13:38 2016
+// Update Count     : 341
 //
 
@@ -70,7 +70,32 @@
 static void dump( std::list< Declaration * > & translationUnit, std::ostream & out = std::cout );
 
+//************************************************
+
+#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__ ))
+#define CFA_ASSERT_FMT "*CFA assertion error* from program \"%s\" in \"%s\" at line %d in file \"%s\": "
+
+extern const char * __progname;							// global name of running executable (argv[0])
+// called by macro assert in assert.h
+void __assert_fail( const char *assertion, const char *file, unsigned int line, const char *function ) {
+	fprintf( stderr, CFA_ASSERT_FMT, __progname, function, line, file );
+	exit( EXIT_FAILURE );
+}
+
+#include <cstdarg>
+// called by macro assertf
+void __assert_fail_f( const char *assertion, const char *file, unsigned int line, const char *function, const char *fmt, ... ) {
+	fprintf( stderr, CFA_ASSERT_FMT, __progname, function, line, file );
+	va_list args;
+	va_start( args, fmt );
+	vfprintf( stderr, fmt, args );
+	exit( EXIT_FAILURE );
+}
+
+//************************************************
 
 int main( int argc, char * argv[] ) {
-	FILE * input;
+	FILE * input;										// use FILE rather than istream because yyin is FILE
 	std::ostream *output = & std::cout;
 	std::list< Declaration * > translationUnit;
@@ -81,10 +106,7 @@
 	try {
 		// choose to read the program from a file or stdin
-		if ( optind < argc ) {
+		if ( optind < argc ) {							// any commands after the flags ? => input file name
 			input = fopen( argv[ optind ], "r" );
-			if ( ! input ) {
-				std::cout << "Error: cannot open " << argv[ optind ] << std::endl;
-				exit( EXIT_FAILURE );
-			} // if
+			assertf( input, "cannot open %s\n", argv[ optind ] );
 			// if running cfa-cpp directly, might forget to pass -F option (and really shouldn't have to)
 			if ( filename == nullptr ) filename = argv[ optind ];
@@ -92,5 +114,5 @@
 			if ( libcfap ) filename = "prelude.cf";
 			optind += 1;
-		} else {
+		} else {										// no input file name
 			input = stdin;
 			// if running cfa-cpp directly, might forget to pass -F option. Since this takes from stdin, pass
@@ -99,5 +121,5 @@
 		} // if
 
-		if ( optind < argc ) {
+		if ( optind < argc ) {							// any commands after the flags and input file ? => output file name
 			output = new ofstream( argv[ optind ] );
 		} // if
@@ -107,16 +129,10 @@
 			// -l is for initial build ONLY and builtins.cf is not in the lib directory so access it here.
 			FILE * builtins = fopen( libcfap | treep ? "builtins.cf" : CFA_LIBDIR "/builtins.cf", "r" );
-			if ( builtins == nullptr ) {
-				std::cerr << "Error: cannot open builtins.cf" << std::endl;
-				exit( EXIT_FAILURE );
-			} // if
+			assertf( builtins, "cannot open builtins.cf\n" );
 			parse( builtins, LinkageSpec::Compiler );
 
 			// read the extra prelude in, if not generating the cfa library
 			FILE * extras = fopen( libcfap | treep ? "extras.cf" : CFA_LIBDIR "/extras.cf", "r" );
-			if ( extras == nullptr ) {
-				std::cerr << "Error: cannot open extras.cf" << std::endl;
-				exit( EXIT_FAILURE );
-			} // if
+			assertf( extras, "cannot open extras.cf\n" );
 			parse( extras, LinkageSpec::C );
 
@@ -124,9 +140,5 @@
 				// read the prelude in, if not generating the cfa library
 				FILE * prelude = fopen( treep ? "prelude.cf" : CFA_LIBDIR "/prelude.cf", "r" );
-				if ( prelude == nullptr ) {
-					std::cerr << "Error: cannot open prelude.cf" << std::endl;
-					exit( EXIT_FAILURE );
-				} // if
-
+				assertf( prelude, "cannot open prelude.cf\n" );
 				parse( prelude, LinkageSpec::Intrinsic );
 			} // if
@@ -355,6 +367,5 @@
 			break;
 		  case '?':
-			cout << "Unknown option: '" << (char)optopt << "'" << endl;
-			exit( EXIT_FAILURE );
+			assertf( false, "Unknown option: '%c'\n", (char)optopt );
 		  default:
 			abort();
@@ -397,4 +408,6 @@
 } // dump
 
+
+
 // Local Variables: //
 // tab-width: 4 //
Index: src/tests/.expect/32/gccExtensions.txt
===================================================================
--- src/tests/.expect/32/gccExtensions.txt	(revision 926af747ff7dac04cacef082cdd822ede9e85c2d)
+++ src/tests/.expect/32/gccExtensions.txt	(revision 3b8e52c836b70faf7ced33547b03bc3cca997743)
@@ -11,4 +11,5 @@
     asm ( "nop" :  :  :  );
     static int __y__i_2;
+    static int *__z__Pi_2;
     int __src__i_2;
     int __dst__i_2;
@@ -23,4 +24,14 @@
     const int __i2__Ci_2;
     const int __i3__Ci_2;
+    inline int __f1__Fi___2(){
+    }
+    inline int __f2__Fi___2(){
+    }
+    int __s1__i_2;
+    int __s2__i_2;
+    volatile int __v1__Vi_2;
+    volatile int __v2__Vi_2;
+    int __t1___2;
+    int __t2___2;
     __extension__ const int __ex__Ci_2;
     struct S {
@@ -73,14 +84,4 @@
     ((void)(__extension__ __a__i_2=(__extension__ __b__i_2+__extension__ __c__i_2)));
     ((void)(__extension__ __a__i_2=__extension__ (__extension__ __b__i_2+__extension__ __c__i_2)));
-    inline int __f1__Fi___2(){
-    }
-    inline int __f2__Fi___2(){
-    }
-    int __s1__i_2;
-    int __s2__i_2;
-    int __t1___2;
-    int __t2___2;
-    volatile int __v1__Vi_2;
-    volatile int __v2__Vi_2;
     int __a1__i_2;
     const int __a2__Ci_2;
