Index: driver/cc1.cc
===================================================================
--- driver/cc1.cc	(revision 4f5a8a2441acf4d1cea809cdd5b210abd06f4f3f)
+++ driver/cc1.cc	(revision ef22ad65ff9727de264304f61406d2505d5d7d45)
@@ -10,6 +10,6 @@
 // Created On       : Fri Aug 26 14:23:51 2005
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Sep  3 16:57:05 2018
-// Update Count     : 125
+// Last Modified On : Thu Aug 22 22:29:52 2019
+// Update Count     : 328
 //
 
@@ -19,4 +19,5 @@
 #include <string>
 using std::string;
+#include <algorithm>									// find
 #include <cstdio>										// stderr, stdout, perror, fprintf
 #include <cstdlib>										// getenv, exit, mkstemp
@@ -30,111 +31,116 @@
 
 
-string compiler_name( CFA_BACKEND_CC );					// path/name of C compiler
-
-string D__GCC_BPREFIX__( "-D__GCC_BPREFIX__=" );
-string D__CFA_FLAGPREFIX__( "-D__CFA_FLAG__=" );
-
-char tmpname[] = P_tmpdir "/CFAXXXXXX";
-int tmpfilefd = -1;
-
-
-bool prefix( string arg, string pre ) {
+static string installlibdir( CFA_LIBDIR );				// fixed location of cc1 and cfa-cpp commands when installed
+static string compiler_path( CFA_BACKEND_CC );			// path/name of C compiler
+static bool CFA_flag = false;							// -CFA flag
+static string o_file;
+
+static bool prefix( const string & arg, const string & pre ) {
 	return arg.substr( 0, pre.size() ) == pre;
 } // prefix
 
-enum { NumSuffixes = 2 };
-const string suffixes[NumSuffixes] = { "cfa", "hfa", };
-
-void suffix( string arg, const char * args[], int & nargs ) {
+static void suffix( const string & arg, const char * args[], int & nargs ) {
+	enum { NumSuffixes = 3 };
+	static const string suffixes[NumSuffixes] = { "cfa", "hfa", "ifa" };
+
 	//std::cerr << arg << std::endl;
 	size_t dot = arg.find_last_of( "." );
 	//std::cerr << dot << " " << (dot != string::npos ? arg.substr( dot + 1 ) : "fred" ) << std::endl;
 	if ( dot == string::npos ) return;
-	string sx = arg.substr( dot + 1 );
-	for ( int i = 0; i < NumSuffixes; i += 1 ) {
-		if ( sx == suffixes[i] ) {
-			args[nargs] = "-x";
-			nargs += 1;
-			args[nargs] = "c";
-			nargs += 1;
-			return;
-		} // if
-	} // for
+	const string * end = suffixes + NumSuffixes;
+	if ( std::find( suffixes, end, arg.substr( dot + 1 ) ) != end ) {
+		args[nargs++] = "-x";
+		args[nargs++] = "c";
+	} // if
 } // suffix
 
 
-void checkEnv( const char * args[], int & nargs ) {
-	char *value;
-
-	value = getenv( "__CFA_COMPILER__" );
-	if ( value != NULL ) {
-		compiler_name = value;
-		#ifdef __DEBUG_H__
-		cerr << "env arg:\"" << compiler_name << "\"" << endl;
-		#endif // __DEBUG_H__
-	} // if
-
-	value = getenv( "__GCC_MACHINE__" );
-	if ( value != NULL ) {
-		args[nargs] = ( *new string( value ) ).c_str(); // pass the argument along
-		#ifdef __DEBUG_H__
-		cerr << "env arg:\"" << args[nargs] << "\"" << endl;
-		#endif // __DEBUG_H__
-		nargs += 1;
-	} // if
-
-	value = getenv( "__GCC_VERSION__" );
-	if ( value != NULL ) {
-		args[nargs] = ( *new string( value ) ).c_str(); // pass the argument along
-		#ifdef __DEBUG_H__
-		cerr << "env arg:\"" << args[nargs] << "\"" << endl;
-		#endif // __DEBUG_H__
-		nargs += 1;
-	} // if
-} // checkEnv
-
-
-void rmtmpfile() {
+static string __CFA_FLAGPREFIX__( "__CFA_FLAG" );
+
+static void checkEnv1( const char * args[], int & nargs ) { // stage 1
+	extern char ** environ;
+
+	for ( int i = 0; environ[i]; i += 1 ) {
+		string arg = environ[i];
+		#ifdef __DEBUG_H__
+		cerr << "env arg:\"" << arg << "\"" << endl;
+		#endif // __DEBUG_H__
+
+		if ( prefix( arg, __CFA_FLAGPREFIX__ ) ) {
+			string val = arg.substr( __CFA_FLAGPREFIX__.size() + 4 );
+			if ( prefix( val, "-compiler=" ) ) {
+				compiler_path = val.substr( 10 );
+			} // if
+		} // if
+	} // for
+} // checkEnv1
+
+
+static void checkEnv2( const char * args[], int & nargs ) { // stage 2
+	extern char ** environ;
+
+	for ( int i = 0; environ[i]; i += 1 ) {
+		string arg = environ[i];
+		#ifdef __DEBUG_H__
+		cerr << "env arg:\"" << arg << "\"" << endl;
+		#endif // __DEBUG_H__
+
+		if ( prefix( arg, __CFA_FLAGPREFIX__ ) ) {
+			string val = arg.substr( __CFA_FLAGPREFIX__.size() + 4 );
+			if ( prefix( val, "-compiler=" ) ) {
+				compiler_path = val.substr( 10 );
+			} else if ( prefix( val, "-CFA" ) ) {
+				CFA_flag = true;
+			} else if ( prefix( val, "-o=" ) ) {		// output file for -CFA
+				o_file = val.substr( 3 );
+			} else {
+				args[nargs++] = ( *new string( arg.substr( __CFA_FLAGPREFIX__.size() + 4 ) ) ).c_str();
+			} // if
+		} // if
+	} // for
+} // checkEnv2
+
+
+static char tmpname[] = P_tmpdir "/CFAXXXXXX.i";
+static int tmpfilefd = -1;
+static bool startrm = false;
+
+static void rmtmpfile() {
+	startrm = true;										// RACE with C-c C-c
 	if ( unlink( tmpname ) == -1 ) {					// remove tmpname
-		perror ( "CFA Translator error: cpp failed" );
-		exit( EXIT_FAILURE );
-	} // if
-	tmpfilefd = -1;										// mark closed
+		perror ( "CC1 Translator error: failed, unlink" );
+		exit( EXIT_FAILURE );
+	} // if
+	tmpfilefd = -1;										// mark removed
 } // rmtmpfile
 
 
-void sigTermHandler( __attribute__((unused)) int signal ) {
+static void sigTermHandler( int ) {						// C-c C-c
+	if ( startrm ) return;								// return and let rmtmpfile finish, and then program finishes
+
 	if ( tmpfilefd != -1 ) {							// RACE, file created ?
-		rmtmpfile();									// remove
-		exit( EXIT_FAILURE );							// terminate
-	} // if
+		rmtmpfile();									// remove tmpname
+	} // if
+	exit( EXIT_FAILURE );								// terminate
 } // sigTermHandler
 
 
-void Stage1( const int argc, const char * const argv[] ) {
+static void Stage1( const int argc, const char * const argv[] ) {
 	int code;
-
 	string arg;
-	string bprefix;
 
 	const char *cpp_in = NULL;
 	const char *cpp_out = NULL;
 
-	bool CFA_flag = false;
 	bool cpp_flag = false;
-	const char *o_name = NULL;
+	bool o_flag = false;
 
 	const char *args[argc + 100];						// leave space for 100 additional cpp command line values
 	int nargs = 1;										// number of arguments in args list; 0 => command name
-	const char *cargs[20];								// leave space for 20 additional cfa-cpp command line values
-	int ncargs = 1;										// 0 => command name
-
-	signal( SIGINT,  sigTermHandler );
-	signal( SIGTERM, sigTermHandler );
 
 	#ifdef __DEBUG_H__
 	cerr << "Stage1" << endl;
 	#endif // __DEBUG_H__
-	checkEnv( args, nargs );							// arguments passed via environment variables
+	checkEnv1( args, nargs );							// arguments passed via environment variables
 	#ifdef __DEBUG_H__
 	for ( int i = 1; i < argc; i += 1 ) {
@@ -168,30 +174,13 @@
 				i += 1;									// and the argument
 				cpp_flag = true;
-			} else if ( arg == "-D__CFA_PREPROCESS__" ) {
-				CFA_flag = true;
-			} else if ( arg == "-D" && string( argv[i + 1] ) == "__CFA_PREPROCESS__" ) {
-				i += 1;									// and the argument
-				CFA_flag = true;
-			} else if ( prefix( arg, D__CFA_FLAGPREFIX__ ) ) {
-				cargs[ncargs] = ( *new string( arg.substr( D__CFA_FLAGPREFIX__.size() ) ) ).c_str();
-				ncargs += 1;
-			} else if ( arg == "-D" && prefix( argv[i + 1], D__CFA_FLAGPREFIX__.substr(2) ) ) {
-				cargs[ncargs] = ( *new string( string( argv[i + 1] ).substr( D__CFA_FLAGPREFIX__.size() - 2 ) ) ).c_str();
-				ncargs += 1;
-				i += 1;									// and the argument
-			} else if ( prefix( arg, D__GCC_BPREFIX__ ) ) {
-				bprefix = arg.substr( D__GCC_BPREFIX__.size() );
-			} else if ( arg == "-D" && prefix( argv[i + 1], D__GCC_BPREFIX__.substr(2) ) ) {
-				bprefix = string( argv[i + 1] ).substr( D__GCC_BPREFIX__.size() - 2 );
-				i += 1;									// and the argument
-
-			// all other flags
+
+				// all other flags
 
 			} else if ( arg == "-o" ) {
 				i += 1;
-				o_name = argv[i];
+				o_flag = true;
+				cpp_out = argv[i];
 			} else {
-				args[nargs] = argv[i];					// pass the flag along
-				nargs += 1;
+				args[nargs++] = argv[i];				// pass the flag along
 				// CPP flags with an argument
 				if ( arg == "-D" || arg == "-U" || arg == "-I" || arg == "-MF" || arg == "-MT" || arg == "-MQ" ||
@@ -199,15 +188,12 @@
 					 arg == "-iwithprefix" || arg == "-iwithprefixbefore" || arg == "-isystem" || arg == "-isysroot" ) {
 					i += 1;
-					args[nargs] = argv[i];				// pass the argument along
-					nargs += 1;
+					args[nargs++] = argv[i];			// pass the argument along
 					#ifdef __DEBUG_H__
 					cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl;
 					#endif // __DEBUG_H__
 				} else if ( arg == "-MD" || arg == "-MMD" ) {
-					args[nargs] = "-MF";				// insert before file
-					nargs += 1;
+					args[nargs++] = "-MF";				// insert before file
 					i += 1;
-					args[nargs] = argv[i];				// pass the argument along
-					nargs += 1;
+					args[nargs++] = argv[i];			// pass the argument along
 					#ifdef __DEBUG_H__
 					cerr << "argv[" << i << "]:\"" << argv[i] << "\"" << endl;
@@ -252,14 +238,11 @@
 		// output or -o. The call to cfa has a -E so it does not have to be added to the argument list.
 
-		args[0] = compiler_name.c_str();
+		args[0] = compiler_path.c_str();
 		suffix( cpp_in, args, nargs );					// check suffix
-		args[nargs] = cpp_in;
-		nargs += 1;
-		if ( o_name != NULL ) {							// location for output
-			args[nargs] = "-o";
-			nargs += 1;
-			args[nargs] = o_name;
-			nargs += 1;
-		} // if
+		args[nargs++] = cpp_in;
+		if ( o_flag ) {									// location for output
+			args[nargs++] = "-o";
+		} // if
+		args[nargs++] = cpp_out;
 		args[nargs] = NULL;								// terminate argument list
 
@@ -273,21 +256,9 @@
 
 		execvp( args[0], (char *const *)args );			// should not return
-		perror( "CFA Translator error: cpp level, execvp" );
-		exit( EXIT_FAILURE );
-	} // if
-
-	// Create a temporary file to store output of the C preprocessor.
-
-	tmpfilefd = mkstemp( tmpname );
-	if ( tmpfilefd == -1 ) {
-		perror( "CFA Translator error: cpp level, mkstemp" );
-		exit( EXIT_FAILURE );
-	} // if
-
-	#ifdef __DEBUG_H__
-	cerr << "tmpname:" << tmpname << " tmpfilefd:" << tmpfilefd << endl;
-	#endif // __DEBUG_H__
-
-	// Run the C preprocessor and save the output in tmpfile.
+		perror( "CC1 Translator error: stage 1, execvp" );
+		exit( EXIT_FAILURE );
+	} // if
+
+	// Run the C preprocessor and save the output in the given file.
 
 	if ( fork() == 0 ) {								 // child process ?
@@ -295,13 +266,12 @@
 		// an error (e.g., cannot find include file). Whereas, output is always generated, even when there is an error,
 		// when cpp writes to stdout. Hence, stdout is redirected into the temporary file.
-		if ( freopen( tmpname, "w", stdout ) == NULL ) { // redirect stdout to tmpname
-			perror( "CFA Translator error: cpp level, freopen" );
+		if ( freopen( cpp_out, "w", stdout ) == NULL ) { // redirect stdout to output file
+			perror( "CC1 Translator error: stage 1, freopen" );
 			exit( EXIT_FAILURE );
 		} // if
 
-		args[0] = compiler_name.c_str();
+		args[0] = compiler_path.c_str();
 		suffix( cpp_in, args, nargs );					// check suffix
-		args[nargs] = cpp_in;							// input to cpp
-		nargs += 1;
+		args[nargs++] = cpp_in;							// input to cpp
 		args[nargs] = NULL;								// terminate argument list
 
@@ -315,5 +285,5 @@
 
 		execvp( args[0], (char *const *)args );			// should not return
-		perror( "CFA Translator error: cpp level, execvp" );
+		perror( "CC1 Translator error: stage 1, execvp" );
 		exit( EXIT_FAILURE );
 	} // if
@@ -325,81 +295,29 @@
 	#endif // __DEBUG_H__
 
-	if ( WIFSIGNALED(code) != 0 ) {						// child failed ?
-		rmtmpfile();									// remove tmpname
-		cerr << "CFA Translator error: cpp failed with signal " << WTERMSIG(code) << endl;
-		exit( EXIT_FAILURE );
-	} // if
-
-	if ( WEXITSTATUS(code) != 0 ) {						// child error ?
-		rmtmpfile();									// remove tmpname
-		exit( WEXITSTATUS( code ) );					// do not continue
-	} // if
-
-	// If -CFA flag specified, run the cfa-cpp preprocessor on the temporary file, and output is written to standard
-	// output.  Otherwise, run the cfa-cpp preprocessor on the temporary file and save the result into the output file.
-
-	if ( fork() == 0 ) {								// child runs CFA
-		cargs[0] = ( *new string( bprefix + "cfa-cpp" ) ).c_str();
-
-		// Source file-name used to generate routine names containing global initializations for TU.
-		cargs[ncargs] = ( *new string( "-F" ) ).c_str();
-		ncargs += 1;
-		cargs[ncargs] = ( *new string( string( cpp_in ) ) ).c_str();
-		ncargs += 1;
-
-		cargs[ncargs] = tmpname;
-		ncargs += 1;
-		if ( o_name != NULL ) {
-			cargs[ncargs] = o_name;
-			ncargs += 1;
-		} else if ( ! CFA_flag ) {						// run cfa-cpp ?
-			cargs[ncargs] = cpp_out;
-			ncargs += 1;
-		} // if
-		cargs[ncargs] = NULL;							// terminate argument list
-
-		#ifdef __DEBUG_H__
-		cerr << "cfa-cpp ncargs: " << (o_name ? o_name : "No -o") << " " << CFA_flag << " " << ncargs << endl;
-		for ( int i = 0; cargs[i] != NULL; i += 1 ) {
-			cerr << cargs[i] << " ";
-		} // for
-		cerr << endl;
-		#endif // __DEBUG_H__
-
-		execvp( cargs[0], (char * const *)cargs );		// should not return
-		perror( "CFA Translator error: cpp level, execvp" );
-		exit( EXIT_FAILURE );
-	} // if
-
-	wait( &code );										// wait for child to finish
-
-	#ifdef __DEBUG_H__
-	cerr << "return code from cfa-cpp:" << WEXITSTATUS(code) << endl;
-	#endif // __DEBUG_H__
-
-	// Must unlink here because file must exist across execvp.
-	rmtmpfile();										// remove tmpname
-
 	if ( WIFSIGNALED(code) ) {							// child failed ?
-		cerr << "CFA Translator error: cfa-cpp failed with signal " << WTERMSIG(code) << endl;
-		exit( EXIT_FAILURE );
-	} // if
-
-	exit( WEXITSTATUS(code) );
+		cerr << "CC1 Translator error: stage 1, child failed " << WTERMSIG(code) << endl;
+		exit( EXIT_FAILURE );
+	} // if
+
+	exit( WEXITSTATUS(code) );							// bad cpp result stops top-level gcc
 } // Stage1
 
 
-void Stage2( const int argc, const char * const * argv ) {
+static void Stage2( const int argc, const char * const * argv ) {
+	int code;
 	string arg;
 
-	const char *cpp_in = NULL;
+	const char * cpp_in = NULL;
+	const char * cpp_out = NULL;
 
 	const char *args[argc + 100];						// leave space for 100 additional cfa command line values
 	int nargs = 1;										// number of arguments in args list; 0 => command name
+	const char *cargs[20];								// leave space for 20 additional cfa-cpp command line values
+	int ncargs = 1;										// 0 => command name
 
 	#ifdef __DEBUG_H__
 	cerr << "Stage2" << endl;
 	#endif // __DEBUG_H__
-	checkEnv( args, nargs );							// arguments passed via environment variables
+	checkEnv2( cargs, ncargs );							// arguments passed via environment variables
 	#ifdef __DEBUG_H__
 	for ( int i = 1; i < argc; i += 1 ) {
@@ -430,10 +348,9 @@
 
 			} else {
-				args[nargs] = argv[i];					// pass the flag along
-				nargs += 1;
+				args[nargs++] = argv[i];				// pass the flag along
 				if ( arg == "-o" ) {
 					i += 1;
-					args[nargs] = argv[i];				// pass the argument along
-					nargs += 1;
+					cpp_out = argv[i];
+					args[nargs++] = argv[i];			// pass the argument along
 					#ifdef __DEBUG_H__
 					cerr << "arg:\"" << argv[i] << "\"" << endl;
@@ -447,4 +364,9 @@
 				cerr << "cpp_in:\"" << cpp_in << "\"" << endl;
 				#endif // __DEBUG_H__
+			} else if ( cpp_out == NULL ) {
+				cpp_out = argv[i];
+				#ifdef __DEBUG_H__
+				cerr << "cpp_out:\"" << cpp_out << "\""<< endl;
+				#endif // __DEBUG_H__
 			} else {
 				cerr << "Usage: " << argv[0] << " input-file [output-file] [options]" << endl;
@@ -454,4 +376,69 @@
 	} // for
 
+	// Create a temporary file, if needed, to store output of the cfa-cpp preprocessor. Cannot be created in forked
+	// process because variables tmpname and tmpfilefd are cloned.
+
+	if ( ! CFA_flag ) {								// run cfa-cpp ?
+		tmpfilefd = mkstemps( tmpname, 2 );
+		if ( tmpfilefd == -1 ) {
+			perror( "CC1 Translator error: stage 2, mkstemp" );
+			exit( EXIT_FAILURE );
+		} // if
+
+		#ifdef __DEBUG_H__
+		cerr << "tmpname:" << tmpname << " tmpfilefd:" << tmpfilefd << endl;
+		#endif // __DEBUG_H__
+	} // if
+
+	// If -CFA flag specified, run the cfa-cpp preprocessor on the temporary file, and output is written to standard
+	// output.  Otherwise, run the cfa-cpp preprocessor on the temporary file and save the result into the output file.
+
+	if ( fork() == 0 ) {								// child runs CFA
+		cargs[0] = ( *new string( installlibdir + "cfa-cpp" ) ).c_str();
+
+		cargs[ncargs++] = cpp_in;
+
+		if ( CFA_flag ) {								// run cfa-cpp ?
+			if ( o_file.size() != 0 ) {					// location for output
+				cargs[ncargs++] = ( *new string( o_file.c_str() ) ).c_str();
+			} // if
+		} else {
+			cargs[ncargs++] = tmpname;
+		} // if
+		cargs[ncargs] = NULL;							// terminate argument list
+
+		#ifdef __DEBUG_H__
+		for ( int i = 0; cargs[i] != NULL; i += 1 ) {
+			cerr << cargs[i] << " ";
+		} // for
+		cerr << endl;
+		#endif // __DEBUG_H__
+
+		execvp( cargs[0], (char * const *)cargs );		// should not return
+		perror( "CC1 Translator error: stage 2, execvp" );
+		exit( EXIT_FAILURE );
+	} // if
+
+	wait( &code );										// wait for child to finish
+
+	if ( WIFSIGNALED(code) ) {							// child failed ?
+		rmtmpfile();									// remove tmpname
+		cerr << "CC1 Translator error: stage 2, child failed " << WTERMSIG(code) << endl;
+		exit( EXIT_FAILURE );
+	} // if
+
+	if ( CFA_flag ) {									// no tmpfile created
+		exit( WEXITSTATUS( code ) );					// stop regardless of success or failure
+	} // if
+
+	#ifdef __DEBUG_H__
+	cerr << "return code from cfa-cpp:" << WEXITSTATUS(code) << endl;
+	#endif // __DEBUG_H__
+
+	if ( WEXITSTATUS(code) ) {							// child error ?
+		rmtmpfile();									// remove tmpname
+		exit( WEXITSTATUS( code ) );					// do not continue
+	} // if
+
 	#ifdef __DEBUG_H__
 	cerr << "args:";
@@ -463,24 +450,44 @@
 	#endif // __DEBUG_H__
 
-	args[0] = compiler_name.c_str();
-	args[nargs] = "-S";									// only compile and put assembler output in specified file
-	nargs += 1;
-	args[nargs] = cpp_in;
-	nargs += 1;
-	args[nargs] = NULL;									// terminate argument list
-
-	#ifdef __DEBUG_H__
-	cerr << "stage2 nargs: " << nargs << endl;
-	for ( int i = 0; args[i] != NULL; i += 1 ) {
-		cerr << args[i] << " ";
-	} // for
-	cerr << endl;
-	#endif // __DEBUG_H__
-
-	execvp( args[0], (char * const *)args );			// should not return
-	perror( "CFA Translator error: cpp level, execvp" );
-	exit( EXIT_FAILURE );								// tell gcc not to go any further
+	if ( fork() == 0 ) {								// child runs CFA
+		args[0] = compiler_path.c_str();
+		args[nargs++] = "-S";							// only compile and put assembler output in specified file
+		args[nargs++] = tmpname;
+		args[nargs] = NULL;								// terminate argument list
+
+		#ifdef __DEBUG_H__
+		cerr << "stage2 nargs: " << nargs << endl;
+		for ( int i = 0; args[i] != NULL; i += 1 ) {
+			cerr << args[i] << " ";
+		} // for
+		cerr << endl;
+		#endif // __DEBUG_H__
+
+		execvp( args[0], (char * const *)args );		// should not return
+		perror( "CC1 Translator error: stage 2, execvp" );
+		exit( EXIT_FAILURE );							// tell gcc not to go any further
+	} // if
+
+	wait( &code );										// wait for child to finish
+
+	if ( WIFSIGNALED(code) ) {							// child failed ?
+		rmtmpfile();									// remove tmpname
+		cerr << "CC1 Translator error: stage 2, child failed " << WTERMSIG(code) << endl;
+		exit( EXIT_FAILURE );
+	} // if
+
+	#ifdef __DEBUG_H__
+	cerr << "return code from gcc cc1:" << WEXITSTATUS(code) << endl;
+	#endif // __DEBUG_H__
+
+	rmtmpfile();										// remove tmpname
+	exit( WEXITSTATUS( code ) );						// stop regardless of success or failure
 } // Stage2
 
+
+// This program is called twice because of the -no-integrated-cpp. The calls are differentiated by the first
+// command-line argument. The first call replaces the traditional cpp pass to preprocess the C program. The second call
+// is to the compiler, which is broken into two steps: preprocess again with cfa-cpp and then call gcc to compile the
+// doubly preprocessed program.
 
 int main( const int argc, const char * const argv[], __attribute__((unused)) const char * const env[] ) {
@@ -490,4 +497,7 @@
 	} // for
 	#endif // __DEBUG_H__
+
+	signal( SIGINT,  sigTermHandler );
+	signal( SIGTERM, sigTermHandler );
 
 	string arg = argv[1];
Index: driver/cfa.cc
===================================================================
--- driver/cfa.cc	(revision 4f5a8a2441acf4d1cea809cdd5b210abd06f4f3f)
+++ driver/cfa.cc	(revision ef22ad65ff9727de264304f61406d2505d5d7d45)
@@ -10,6 +10,6 @@
 // Created On       : Tue Aug 20 13:44:49 2002
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Aug 10 08:44:15 2019
-// Update Count     : 311
+// Last Modified On : Thu Aug 22 22:29:50 2019
+// Update Count     : 403
 //
 
@@ -28,5 +28,4 @@
 #include "config.h"										// configure info
 
-
 using std::cerr;
 using std::endl;
@@ -34,18 +33,26 @@
 using std::to_string;
 
-
 //#define __DEBUG_H__
 
 
-bool prefix( string arg, string pre ) {
+void Putenv( char * argv[], string arg ) {
+	static int flags = 0;								// environment variables must have unique names
+
+	if ( putenv( (char *)( *new string( string( "__CFA_FLAG" + to_string( flags++ ) + "__=" ) + arg ) ).c_str() ) != 0 ) {
+		cerr << argv[0] << " error, cannot set environment variable." << endl;
+		exit( EXIT_FAILURE );
+	} // if
+} // Putenv
+
+
+bool prefix( const string & arg, const string & pre ) {	// check if string has prefix
 	return arg.substr( 0, pre.size() ) == pre;
 } // prefix
 
-bool suffix( string arg ) {
+bool suffix( const string & arg ) {						// check if string has suffix
 	enum { NumSuffixes = 3 };
 	static const string suffixes[NumSuffixes] = { "cfa", "hfa", "ifa" };
-	//std::cerr << arg << std::endl;
+
 	size_t dot = arg.find_last_of( "." );
-	//std::cerr << dot << " " << (dot != string::npos ? arg.substr( dot + 1 ) : "fred" ) << std::endl;
 	if ( dot == string::npos ) return false;
 	const string * end = suffixes + NumSuffixes;
@@ -54,33 +61,18 @@
 
 
-void shuffle( const char * args[], int S, int E, int N ) {
-	// S & E index 1 passed the end so adjust with -1
-	#ifdef __DEBUG_H__
-	cerr << "shuffle:" << S << " " << E << " " << N << endl;
-	#endif // __DEBUG_H__
-	for ( int j = E-1 + N; j > S-1 + N; j -=1 ) {
-		#ifdef __DEBUG_H__
-		cerr << "\t" << j << " " << j-N << endl;
-		#endif // __DEBUG_H__
-		args[j] = args[j-N];
-	} // for
-} // shuffle
-
-static inline bool dirExists( const string & path ) {
+static inline bool dirExists( const string & path ) {	// check if directory exists
     struct stat info;
-    if(stat( path.c_str(), &info ) != 0)
-        return false;
-    else if(info.st_mode & S_IFDIR)
-        return true;
-    else
-        return false;
-} //dirExists
-
-
+    if ( stat( path.c_str(), &info ) != 0 ) return false;
+    if ( info.st_mode & S_IFDIR ) return true;
+	return false;
+} // dirExists
+
+
+#define xstr(s) str(s)
 #define str(s) #s
 
 int main( int argc, char * argv[] ) {
 	string Version( CFA_VERSION_LONG );					// current version number from CONFIG
-	string Major( str( CFA_VERSION_MAJOR ) ), Minor( str( CFA_VERSION_MINOR ) ), Patch( str( CFA_VERSION_PATCH ) );
+	string Major( xstr( CFA_VERSION_MAJOR ) ), Minor( xstr( CFA_VERSION_MINOR ) ), Patch( xstr( CFA_VERSION_PATCH ) );
 
 	string installincdir( CFA_INCDIR );					// fixed location of include files
@@ -112,4 +104,5 @@
 	bool m64 = false;									// -m64 flag
 	bool intree = false;
+	int o_file = 0;										// -o filename position
 
 	const char *args[argc + 100];						// cfa command line values, plus some space for additional flags
@@ -135,14 +128,12 @@
 
 			if ( arg == "-Xlinker" || arg == "-o" ) {
-				args[nargs] = argv[i];					// pass the argument along
-				nargs += 1;
+				args[nargs++] = argv[i];				// pass argument along
 				i += 1;
 				if ( i == argc ) continue;				// next argument available ?
-				args[nargs] = argv[i];					// pass the argument along
-				nargs += 1;
+				args[nargs++] = argv[i];				// pass argument along
+				if ( arg == "-o" ) o_file = i;			// remember file
 			} else if ( arg == "-XCFA" ) {				// CFA pass through
 				i += 1;
-				args[nargs] = ( *new string( string("-D__CFA_FLAG__=") + argv[i] ) ).c_str();
-				nargs += 1;
+				Putenv( argv, argv[i] );
 
 				// CFA specific arguments
@@ -151,10 +142,9 @@
 				CFA_flag = true;						// strip the -CFA flag
 				link = false;
-				args[nargs] = "-E";						// replace the argument with -E
-				nargs += 1;
+				args[nargs++] = "-fsyntax-only";		// stop after stage 2
 			} else if ( arg == "-debug" ) {
 				debug = true;							// strip the debug flag
 			} else if ( arg == "-nodebug" ) {
-				debug = false;							// strip the debug flag
+				debug = false;							// strip the nodebug flag
 			} else if ( arg == "-nolib" ) {
 				nolib = true;							// strip the nodebug flag
@@ -176,8 +166,5 @@
 				if ( i == argc ) continue;				// next argument available ?
 				compiler_path = argv[i];
-				if ( putenv( (char *)( *new string( string( "__CFA_COMPILER__=" ) + argv[i]) ).c_str() ) != 0 ) {
-					cerr << argv[0] << " error, cannot set environment variable." << endl;
-					exit( EXIT_FAILURE );
-				} // if
+				Putenv( argv, arg + "=" + argv[i] );
 
 				// C specific arguments
@@ -185,20 +172,16 @@
 			} else if ( arg == "-v" ) {
 				verbose = true;							// verbosity required
-				args[nargs] = argv[i];					// pass the argument along
-				nargs += 1;
+				args[nargs++] = argv[i];				// pass argument along
 			} else if ( arg == "-g" ) {
 				debugging = true;						// symbolic debugging required
-				args[nargs] = argv[i];					// pass the argument along
-				nargs += 1;
+				args[nargs++] = argv[i];				// pass argument along
 			} else if ( prefix( arg, "-x" ) ) {			// file suffix ?
 				string lang;
-				args[nargs] = argv[i];					// pass the argument along
-				nargs += 1;
+				args[nargs++] = argv[i];				// pass argument along
 				if ( arg.length() == 2 ) {				// separate argument ?
 					i += 1;
 					if ( i == argc ) continue;			// next argument available ?
 					lang = argv[i];
-					args[nargs] = argv[i];				// pass the argument along
-					nargs += 1;
+					args[nargs++] = argv[i];			// pass argument along
 				} else {
 					lang = arg.substr( 2 );
@@ -207,23 +190,18 @@
 			} else if ( prefix( arg, "-std=" ) || prefix( arg, "--std=" ) ) {
 				std_flag = true;						// -std=XX provided
-				args[nargs] = argv[i];					// pass the argument along
-				nargs += 1;
+				args[nargs++] = argv[i];				// pass argument along
 			} else if ( arg == "-w" ) {
-				args[nargs] = argv[i];					// pass the argument along
-				nargs += 1;
-				args[nargs] = ( *new string( string("-D__CFA_FLAG__=") + arg ) ).c_str(); // add the argument for cfa-cpp
-				nargs += 1;
+				args[nargs++] = argv[i];				// pass argument along
+				Putenv( argv, arg );
 			} else if ( prefix( arg, "-W" ) ) {			// check before next tests
 				if ( arg == "-Werror" || arg == "-Wall" ) {
-					args[nargs] = argv[i];				// pass the argument along
-					nargs += 1;
-					args[nargs] = ( *new string( string("-D__CFA_FLAG__=") + arg ) ).c_str(); // add the argument for cfa-cpp
-					nargs += 1;
+					args[nargs++] = argv[i];			// pass argument along
+					Putenv( argv, argv[i] );
 				} else {
 					unsigned int adv = prefix( arg, "-Wno-" ) ? 5 : 2;
-					args[nargs] = argv[i];				// conditionally pass the argument along
-					const char * warning = argv[i] + adv;	  // extract warning
+					args[nargs] = argv[i];				// conditionally pass argument along
+					const char * warning = argv[i] + adv; // extract warning
 					if ( SemanticWarning_Exist( warning ) ) { // replace the argument for cfa-cpp
-						args[nargs] = ( *new string( string("-D__CFA_FLAG__=") + arg ) ).c_str();
+						Putenv( argv, arg );
 					} // if
 					nargs += 1;
@@ -231,39 +209,7 @@
 			} else if ( prefix( arg, "-B" ) ) {
 				Bprefix = arg.substr(2);				// strip the -B flag
-				args[nargs] = ( *new string( string("-D__GCC_BPREFIX__=") + Bprefix ) ).c_str();
-				nargs += 1;
-			} else if ( prefix( arg, "-b" ) ) {
-				if ( arg.length() == 2 ) {				// separate argument ?
-					i += 1;
-					if ( i == argc ) continue;			// next argument available ?
-					arg += argv[i];						// concatenate argument
-				} // if
-				// later versions of gcc require the -b option to appear at the start of the command line
-				shuffle( args, sargs, nargs, 1 );		// make room at front of argument list
-				args[sargs] = ( *new string( arg ) ).c_str(); // pass the argument along
-				if ( putenv( (char *)( *new string( string( "__GCC_MACHINE__=" ) + arg ) ).c_str() ) != 0 ) {
-					cerr << argv[0] << " error, cannot set environment variable." << endl;
-					exit( EXIT_FAILURE );
-				} // if
-				sargs += 1;
-				nargs += 1;
-			} else if ( prefix( arg, "-V" ) ) {
-				if ( arg.length() == 2 ) {				// separate argument ?
-					i += 1;
-					if ( i == argc ) continue;			// next argument available ?
-					arg += argv[i];						// concatenate argument
-				} // if
-				// later versions of gcc require the -V option to appear at the start of the command line
-				shuffle( args, sargs, nargs, 1 );		// make room at front of argument list
-				args[sargs] = ( *new string( arg ) ).c_str(); // pass the argument along
-				if ( putenv( (char *)( *new string( string( "__GCC_VERSION__=" ) + arg ) ).c_str() ) != 0 ) {
-					cerr << argv[0] << " error, cannot set environment variable." << endl;
-					exit( EXIT_FAILURE );
-				} // if
-				sargs += 1;
-				nargs += 1;
+				args[nargs++] = ( *new string( string("-D__GCC_BPREFIX__=") + Bprefix ) ).c_str();
 			} else if ( arg == "-c" || arg == "-S" || arg == "-E" || arg == "-M" || arg == "-MM" ) {
-				args[nargs] = argv[i];					// pass the argument along
-				nargs += 1;
+				args[nargs++] = argv[i];				// pass argument along
 				if ( arg == "-E" || arg == "-M" || arg == "-MM" ) {
 					cpp_flag = true;					// cpp only
@@ -272,36 +218,27 @@
 			} else if ( arg[1] == 'l' ) {
 				// if the user specifies a library, load it after user code
-				libs[nlibs] = argv[i];
-				nlibs += 1;
+				libs[nlibs++] = argv[i];
 			} else if ( arg == "-m32" ) {
 				m32 = true;
 				m64 = false;
-				args[nargs] = argv[i];
-				nargs += 1;
+				args[nargs++] = argv[i];
 			} else if ( arg == "-m64" ) {
 				m64 = true;
 				m32 = false;
-				args[nargs] = argv[i];
-				nargs += 1;
+				args[nargs++] = argv[i];
 			} else {
 				// concatenate any other arguments
-				args[nargs] = argv[i];
-				nargs += 1;
+				args[nargs++] = argv[i];
 			} // if
 		} else {
 			bool cfa = suffix( arg );					// check suffix
 			if ( ! x_flag && cfa ) {					// no explicit suffix and cfa suffix ?
-				args[nargs] = "-x";
-				nargs += 1;
-				args[nargs] = "c";
-				nargs += 1;
+				args[nargs++] = "-x";
+				args[nargs++] = "c";
 			} // if
-			args[nargs] = argv[i];						// concatenate file
-			nargs += 1;
+			args[nargs++] = argv[i];					// concatenate files
 			if ( ! x_flag && cfa ) {					// no explicit suffix and cfa suffix ?
-				args[nargs] = "-x";
-				nargs += 1;
-				args[nargs] = "none";
-				nargs += 1;
+				args[nargs++] = "-x";
+				args[nargs++] = "none";
 			} // if
 			nonoptarg = true;
@@ -310,6 +247,5 @@
 
 	#ifdef __x86_64__
-	args[nargs] = "-mcx16";								// allow double-wide CAA
-	nargs += 1;
+	args[nargs++] = "-mcx16";							// allow double-wide CAA
 	#endif // __x86_64__
 
@@ -322,158 +258,106 @@
 	#endif // __DEBUG_H__
 
-	if ( cpp_flag && CFA_flag ) {
-		cerr << argv[0] << " error, cannot use -E and -CFA flags together." << endl;
-		exit( EXIT_FAILURE );
-	} // if
+	// if ( cpp_flag && CFA_flag ) {
+	// 	cerr << argv[0] << " error, cannot use -E and -CFA flags together." << endl;
+	// 	exit( EXIT_FAILURE );
+	// } // if
 
 	// add the CFA include-library paths, which allow direct access to header files without directory qualification
-	if( !intree ) {
-		args[nargs] = "-I" CFA_INCDIR;
-		nargs += 1;
+	if ( ! intree ) {
+		args[nargs++] = "-I" CFA_INCDIR;
 		if ( ! noincstd_flag ) {						// do not use during build
-			args[nargs] = "-I" CFA_INCDIR "stdhdr";
-			nargs += 1;
+			args[nargs++] = "-I" CFA_INCDIR "stdhdr";
 		} // if
-		args[nargs] = "-I" CFA_INCDIR "concurrency";
-		nargs += 1;
-		args[nargs] = "-I" CFA_INCDIR "containers";
-		nargs += 1;
-	} else {
-		args[nargs] = "-I" TOP_SRCDIR "libcfa/src";
-		nargs += 1;
+		args[nargs++] = "-I" CFA_INCDIR "concurrency";
+		args[nargs++] = "-I" CFA_INCDIR "containers";
+	} else {
+		args[nargs++] = "-I" TOP_SRCDIR "libcfa/src";
 		if ( ! noincstd_flag ) {						// do not use during build
-			args[nargs] = "-I" TOP_SRCDIR "libcfa/src" "/stdhdr";
-			nargs += 1;
+			args[nargs++] = "-I" TOP_SRCDIR "libcfa/src" "/stdhdr";
 		} // if
-		args[nargs] = "-I" TOP_SRCDIR "libcfa/src" "/concurrency";
-		nargs += 1;
-		args[nargs] = "-I" TOP_SRCDIR "libcfa/src" "/containers";
-		nargs += 1;
-	}
+		args[nargs++] = "-I" TOP_SRCDIR "libcfa/src" "/concurrency";
+		args[nargs++] = "-I" TOP_SRCDIR "libcfa/src" "/containers";
+	} // if
 
 	// add stdbool to get defines for bool/true/false
-	args[nargs] = "-imacros";
-	nargs += 1;
-	args[nargs] = "stdbool.h";
-	nargs += 1;
+	args[nargs++] = "-imacros";
+	args[nargs++] = "stdbool.h";
 
 	string libbase;
-	if( !intree ) {
+	if ( ! intree ) {
 		libbase = CFA_LIBDIR;
 	} else {
 		libbase = TOP_BUILDDIR "libcfa/";
-		args[nargs] = "-D__CFA_FLAG__=-t";
-		nargs += 1;
-	}
+		Putenv( argv, "-t" );
+	} // if
 
 	string arch = m32 ? CFA_32_CPU : (m64 ? CFA_64_CPU : CFA_DEFAULT_CPU);
 	if ( ! m32 && ! m64 ) {
 		if ( arch == "x86" ) {
-			args[nargs] = "-m32";
-			nargs += 1;
+			args[nargs++] = "-m32";
 		} else if ( arch == "x64" ) {
-			args[nargs] = "-m64";
-			nargs += 1;
+			args[nargs++] = "-m64";
 		}  // if
 	} // if
-	const char * config = nolib ? "nolib" : (debug ? "debug": "nodebug");
-	string libdir = libbase + arch + "-" + config;
-
-	if ( ! nolib && ! dirExists( libdir ) ) {
-		cerr << argv[0] << " internal error, configuration " << config << " not installed." << endl;
-		cerr << "Was looking for " << libdir << endl;
-		libdir = libbase + arch + "-" + "nolib";
-	} // if
-
+
+	string libdir = libbase + arch + "-" + (nolib ? "nolib" : (debug ? "debug": "nodebug"));
 	if ( ! dirExists( libdir ) ) {
-		cerr << argv[0] << " internal error, cannot find prelude directory." << endl;
-		cerr << "Was looking for " << libdir << endl;
+		cerr << argv[0] << " internal error, cannot find prelude directory " << libdir << endl;
 		exit( EXIT_FAILURE );
 	} // if
 
-	args[nargs] = ( *new string( string("-D__CFA_FLAG__=--prelude-dir=" ) + libdir + (intree ? "/prelude" : "")) ).c_str();
-	nargs += 1;
-
 	for ( int i = 0; i < nlibs; i += 1 ) {				// copy non-user libraries after all user libraries
-		args[nargs] = libs[i];
-		nargs += 1;
+		args[nargs++] = libs[i];
 	} // for
 
 	if ( link ) {
-		args[nargs] = "-Xlinker";
-		nargs += 1;
-		args[nargs] = "--undefined=__cfaabi_dbg_bits_write";
-		nargs += 1;
-		args[nargs] = "-Xlinker";
-		nargs += 1;
-		args[nargs] = "--undefined=__cfaabi_interpose_startup";
-		nargs += 1;
-		args[nargs] = "-Xlinker";
-		nargs += 1;
-		args[nargs] = "--undefined=__cfaabi_appready_startup";
-		nargs += 1;
+		args[nargs++] = "-Xlinker";
+		args[nargs++] = "--undefined=__cfaabi_dbg_bits_write";
+		args[nargs++] = "-Xlinker";
+		args[nargs++] = "--undefined=__cfaabi_interpose_startup";
+		args[nargs++] = "-Xlinker";
+		args[nargs++] = "--undefined=__cfaabi_appready_startup";
 
 		// include the cfa library in case it's needed
-		args[nargs] = ( *new string( string("-L" ) + libdir + (intree ? "/src/.libs" : "")) ).c_str();
-		nargs += 1;
-		args[nargs] = ( *new string( string("-Wl,-rpath," ) + libdir + (intree ? "/src/.libs" : "")) ).c_str();
-		nargs += 1;
-		args[nargs] = "-Wl,--push-state,--as-needed";
-		nargs += 1;
-		args[nargs] = "-lcfathread";
-		nargs += 1;
-		args[nargs] = "-Wl,--pop-state";
-		nargs += 1;
-		args[nargs] = "-lcfa";
-		nargs += 1;
-		args[nargs] = "-lpthread";
-		nargs += 1;
-		args[nargs] = "-ldl";
-		nargs += 1;
-		args[nargs] = "-lrt";
-		nargs += 1;
-		args[nargs] = "-lm";
-		nargs += 1;
-	} // if
-
-	// Add exception flags (unconditionally)
-	args[nargs] = "-fexceptions";
-	nargs += 1;
-
-	// add the correct set of flags based on the type of compile this is
-
-	args[nargs] = ( *new string( string("-D__CFA_MAJOR__=") + Major ) ).c_str();
-	nargs += 1;
-	args[nargs] = ( *new string( string("-D__CFA_MINOR__=") + Minor ) ).c_str();
-	nargs += 1;
-	args[nargs] = ( *new string( string("-D__CFA_PATCH__=") + Patch ) ).c_str();
-	nargs += 1;
-	args[nargs] = "-D__CFA__";
-	nargs += 1;
-	args[nargs] = "-D__CFORALL__";
-	nargs += 1;
-	args[nargs] = "-D__cforall";
-	nargs += 1;
+		args[nargs++] = ( *new string( string("-L" ) + libdir + (intree ? "/src/.libs" : "")) ).c_str();
+		args[nargs++] = ( *new string( string("-Wl,-rpath," ) + libdir + (intree ? "/src/.libs" : "")) ).c_str();
+		args[nargs++] = "-Wl,--push-state,--as-needed";
+		args[nargs++] = "-lcfathread";
+		args[nargs++] = "-Wl,--pop-state";
+		args[nargs++] = "-lcfa";
+		args[nargs++] = "-lpthread";
+		args[nargs++] = "-ldl";
+		args[nargs++] = "-lrt";
+		args[nargs++] = "-lm";
+	} // if
+
+	args[nargs++] = "-fexceptions";						// add exception flags (unconditionally)
+
+	// add flags based on the type of compile
+
+	args[nargs++] = ( *new string( string("-D__CFA_MAJOR__=") + Major ) ).c_str();
+	args[nargs++] = ( *new string( string("-D__CFA_MINOR__=") + Minor ) ).c_str();
+	args[nargs++] = ( *new string( string("-D__CFA_PATCH__=") + Patch ) ).c_str();
+	args[nargs++] = "-D__CFA__";
+	args[nargs++] = "-D__CFORALL__";
+	args[nargs++] = "-D__cforall";
 
 	if ( cpp_flag ) {
-		args[nargs] = "-D__CPP__";
-		nargs += 1;
-	} // if
-
-	shuffle( args, sargs, nargs, 1 );					// make room at front of argument list
-	nargs += 1;
+		args[nargs++] = "-D__CPP__";
+	} // if
+
 	if ( CFA_flag ) {
-		args[sargs] = "-D__CFA_FLAG__=-N";
-		args[nargs] = "-D__CFA_PREPROCESS_";
-		nargs += 1;
-	} else {
-		args[sargs] = "-D__CFA_FLAG__=-L";
-	} // if
-	sargs += 1;
+		Putenv( argv, "-N" );
+		Putenv( argv, "-CFA" );
+		if ( o_file ) Putenv( argv, string( "-o=" ) + argv[o_file] );
+	} else {
+		Putenv( argv, "-L" );
+	} // if
+
+	Putenv( argv, "--prelude-dir=" + libdir + (intree ? "/prelude" : "") );
 
 	if ( debug ) {
 		heading += " (debug)";
-		args[nargs] = "-D__CFA_DEBUG__";
-		nargs += 1;
+		args[nargs++] = "-D__CFA_DEBUG__";
 	} else {
 		heading += " (no debug)";
@@ -483,12 +367,9 @@
 		Bprefix = ! intree ? installlibdir : srcdriverdir;
 		if ( Bprefix[Bprefix.length() - 1] != '/' ) Bprefix += '/';
-		args[nargs] = ( *new string( string("-D__GCC_BPREFIX__=") + Bprefix ) ).c_str();
-		nargs += 1;
-	} // if
-
-	args[nargs] = "-Xlinker";							// used by backtrace
-	nargs += 1;
-	args[nargs] = "-export-dynamic";
-	nargs += 1;
+		args[nargs++] = ( *new string( string("-D__GCC_BPREFIX__=") + Bprefix ) ).c_str();
+	} // if
+
+	args[nargs++] = "-Xlinker";							// used by backtrace
+	args[nargs++] = "-export-dynamic";
 
 	// execute the compilation command
@@ -504,22 +385,15 @@
 
 	if ( prefix( compiler_name, "gcc" ) ) {				// allow suffix on gcc name
-		args[nargs] = "-no-integrated-cpp";
-		nargs += 1;
-		args[nargs] = "-Wno-deprecated";
-		nargs += 1;
-#ifdef HAVE_CAST_FUNCTION_TYPE
-		args[nargs] = "-Wno-cast-function-type";
-		nargs += 1;
-#endif // HAVE_CAST_FUNCTION_TYPE
+		args[nargs++] = "-no-integrated-cpp";
+		args[nargs++] = "-Wno-deprecated";
+		#ifdef HAVE_CAST_FUNCTION_TYPE
+		args[nargs++] = "-Wno-cast-function-type";
+		#endif // HAVE_CAST_FUNCTION_TYPE
 		if ( ! std_flag ) {								// default c11, if none specified
-			args[nargs] = "-std=gnu11";
-			nargs += 1;
+			args[nargs++] = "-std=gnu11";
 		} // if
-		args[nargs] = "-fgnu89-inline";
-		nargs += 1;
-		args[nargs] = "-D__int8_t_defined";				// prevent gcc type-size attributes
-		nargs += 1;
-		args[nargs] = ( *new string( string("-B") + Bprefix ) ).c_str();
-		nargs += 1;
+		args[nargs++] = "-fgnu89-inline";
+		args[nargs++] = "-D__int8_t_defined";			// prevent gcc type-size attributes
+		args[nargs++] = ( *new string( string("-B") + Bprefix ) ).c_str();
 	} else {
 		cerr << argv[0] << " error, compiler \"" << compiler_name << "\" unsupported." << endl;
@@ -527,5 +401,5 @@
 	} // if
 
-	args[nargs] = NULL;									// terminate with NULL
+	args[nargs] = NULL;									// terminate
 
 	#ifdef __DEBUG_H__
@@ -568,5 +442,5 @@
 
 	execvp( args[0], (char *const *)args );				// should not return
-	perror( "CFA Translator error: cfa level, execvp" );
+	perror( "CFA Translator error: execvp" );
 	exit( EXIT_FAILURE );
 } // main
