Index: src/Common/SemanticError.h
===================================================================
--- src/Common/SemanticError.h	(revision 6f326b18619413c184048ffa17183130ed64766d)
+++ src/Common/SemanticError.h	(revision 44bca7f23e3aeeef424982f0cb5995957e13f44c)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Apr 19 17:52:03 2018
-// Update Count     : 19
+// Last Modified On : Wed May  2 15:00:01 2018
+// Update Count     : 23
 //
 
@@ -49,5 +49,5 @@
 };
 
-constexpr const WarningData WarningFormats[] = {
+constexpr WarningData WarningFormats[] = {
 	{"self-assign"         , "self assignment of expression: %s"           , Severity::Warn},
 	{"reference-conversion", "rvalue to reference conversion of rvalue: %s", Severity::Warn},
Index: src/driver/Makefile.am
===================================================================
--- src/driver/Makefile.am	(revision 6f326b18619413c184048ffa17183130ed64766d)
+++ src/driver/Makefile.am	(revision 44bca7f23e3aeeef424982f0cb5995957e13f44c)
@@ -11,10 +11,10 @@
 ## Created On       : Sun May 31 08:49:31 2015
 ## Last Modified By : Peter A. Buhr
-## Last Modified On : Fri Oct 28 13:46:06 2016
-## Update Count     : 10
+## Last Modified On : Mon Apr 30 17:44:17 2018
+## Update Count     : 11
 ###############################################################################
 
 # applies to both programs
-AM_CXXFLAGS = -Wall -O2 -g -std=c++14
+AM_CXXFLAGS = -Wall -O2 -g -std=c++14 -I${abs_top_srcdir}/src
 if BUILD_NO_LIB
 else
Index: src/driver/Makefile.in
===================================================================
--- src/driver/Makefile.in	(revision 6f326b18619413c184048ffa17183130ed64766d)
+++ src/driver/Makefile.in	(revision 44bca7f23e3aeeef424982f0cb5995957e13f44c)
@@ -294,6 +294,6 @@
 
 # applies to both programs
-AM_CXXFLAGS = -Wall -O2 -g -std=c++14 $(am__append_1) $(am__append_2) \
-	$(am__append_3)
+AM_CXXFLAGS = -Wall -O2 -g -std=c++14 -I${abs_top_srcdir}/src \
+	$(am__append_1) $(am__append_2) $(am__append_3)
 cfa_SOURCES = cfa.cc
 
Index: src/driver/cfa.cc
===================================================================
--- src/driver/cfa.cc	(revision 6f326b18619413c184048ffa17183130ed64766d)
+++ src/driver/cfa.cc	(revision 44bca7f23e3aeeef424982f0cb5995957e13f44c)
@@ -10,6 +10,6 @@
 // Created On       : Tue Aug 20 13:44:49 2002
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Feb  5 22:05:28 2018
-// Update Count     : 166
+// Last Modified On : Wed May  2 14:32:08 2018
+// Update Count     : 222
 //
 
@@ -19,5 +19,7 @@
 #include <unistd.h>										// execvp
 #include <string>										// STL version
-
+#include <string.h>										// strcmp
+
+#include "Common/SemanticError.h"
 #include "config.h"										// configure info
 
@@ -160,4 +162,27 @@
 				args[nargs] = argv[i];					// pass the argument along
 				nargs += 1;
+			} 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;
+			} 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;
+				} else {
+					unsigned int adv = prefix( arg, "-Wno-" ) ? 5 : 2;
+					args[nargs] = argv[i];				// conditionally pass the argument along
+					char * warning = argv[i] + adv;		// extract warning
+					for ( const auto w : WarningFormats ) {
+						if ( strcmp( warning, w.name ) == 0 ) {	// replace the argument for cfa-cpp
+							args[nargs] = ( *new string( string("-D__CFA_FLAG__=") + arg ) ).c_str();
+							break;
+						} // if
+					} // for
+					nargs += 1;
+				} // if
 			} else if ( prefix( arg, "-B" ) ) {
 				Bprefix = arg.substr(2);				// strip the -B flag
@@ -247,5 +272,5 @@
 		#if ! defined(HAVE_LIBCFA_RELEASE)
 			if( !debug ) {
-				cerr << "error: Option -nodebug is not available, libcfa was not installed." << endl;
+				cerr << "error: Option -nodebug is unavailable, libcfa was not installed." << endl;
 				exit( EXIT_FAILURE );
 				}
@@ -253,5 +278,5 @@
 		#if ! defined(HAVE_LIBCFA_DEBUG)
 			if( debug ) {
-				cerr << "error: Option -debug is not available, libcfa-d was not installed." << endl;
+				cerr << "error: Option -debug is unavailable, libcfa-d was not installed." << endl;
 				exit( EXIT_FAILURE );
 				}
Index: src/main.cc
===================================================================
--- src/main.cc	(revision 6f326b18619413c184048ffa17183130ed64766d)
+++ src/main.cc	(revision 44bca7f23e3aeeef424982f0cb5995957e13f44c)
@@ -1,3 +1,2 @@
-
 //
 // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo
@@ -11,6 +10,6 @@
 // Created On       : Fri May 15 23:12:02 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Oct 31 12:22:40 2017
-// Update Count     : 445
+// Last Modified On : Wed May  2 14:59:02 2018
+// Update Count     : 490
 //
 
@@ -175,4 +174,9 @@
 	signal( SIGABRT, sigAbortHandler );
 
+	// std::cout << "main" << std::endl;
+	// for ( int i = 0; i < argc; i += 1 ) {
+	// 	std::cout << '\t' << argv[i] << std::endl;
+	// } // for
+
 	parse_cmdline( argc, argv, filename );				// process command-line arguments
 	CodeGen::FixMain::setReplaceMain( !nomainp );
@@ -416,6 +420,7 @@
 	opterr = 0;											// (global) prevent getopt from printing error messages
 
+	bool Werror = false;
 	int c;
-	while ( (c = getopt_long( argc, argv, "abBcCdefgGlLmnNpqrstTvyzZD:F:", long_opts, &long_index )) != -1 ) {
+	while ( (c = getopt_long( argc, argv, "abBcCdefgGlLmnNpqrstTvwW:yzZD:F:", long_opts, &long_index )) != -1 ) {
 		switch ( c ) {
 		  case Ast:
@@ -453,5 +458,5 @@
 			yydebug = true;
 			break;
-		  case 'G':                   // dump AST after instantiate generics
+		  case 'G':										// dump AST after instantiate generics
 			genericsp = true;
 			break;
@@ -501,4 +506,33 @@
 		  case 'v':										// dump AST after decl validation pass
 			validp = true;
+			break;
+		  case 'w':
+			for ( auto & w : WarningFormats ) {
+				w.severity = Severity::Suppress;
+			} // for
+			break;
+		  case 'W':
+			if ( strcmp( optarg, "all" ) == 0 ) {
+				for ( auto & w : WarningFormats ) {
+					if ( w.severity == Severity::Suppress ) w.severity = Severity::Warn;
+				} // for
+			} else if ( strcmp( optarg, "error" ) == 0 ) {
+				Werror = true;
+			} else {
+				char * warning = optarg;
+				Severity s;
+				if ( strncmp( optarg, "no-", 3 ) == 0 ) {
+					warning += 3;
+					s = Severity::Suppress;
+				} else {
+					s = Severity::Warn;
+				} // if
+				for ( auto  & w : WarningFormats ) {
+					if ( strcmp( warning, w.name ) == 0 ) {	// replace the argument for cfa-cpp
+						w.severity = s;
+						break;
+					} // if
+				} // for
+			} // if
 			break;
 		  case 'y':										// dump AST on error
@@ -530,4 +564,13 @@
 		} // switch
 	} // while
+
+	if ( Werror ) {
+		for ( auto & w : WarningFormats ) {
+			if ( w.severity == Severity::Warn ) w.severity = Severity::Error;
+		} // for
+	} // if
+	// for ( const auto w : WarningFormats ) {
+	// 	cout << w.name << ' ' << (int)w.severity << endl;
+	// } // for
 } // parse_cmdline
 
