Index: src/CodeGen/CodeGenerator.cc
===================================================================
--- src/CodeGen/CodeGenerator.cc	(revision aaa1a99a1950364c6bd2925b2f12dd314caccfeb)
+++ src/CodeGen/CodeGenerator.cc	(revision 0c92c9f0632273f81f11622ea9a570797b9c7092)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Dec 13 14:51:27 2016
-// Update Count     : 362
+// Last Modified On : Wed Jan 18 15:23:08 2017
+// Update Count     : 414
 //
 
@@ -111,18 +111,19 @@
 	}
 
-	void CodeGenerator::genAttributes( std::list< Attribute * > & attributes ) {
-		if ( ! attributes.empty() ) {
-			output << "__attribute__ ((";
-			for ( Attribute *& attr : attributes ) {
-				if ( ! attr->empty() ) {
-					output << attr->get_name() << "(";
-					genCommaList( attr->get_parameters().begin(), attr->get_parameters().end() );
-					output << ")";
-				} // if
-				output << ",";
-			} // for
-			output << ")) ";
-		} // if
-	}
+	void CodeGenerator::genAttributes( list< Attribute * > & attributes ) {
+	  if ( attributes.empty() ) return;
+		output << "__attribute__ ((";
+		for ( list< Attribute * >::iterator attr( attributes.begin() );; ) {
+			output << (*attr)->get_name();
+			if ( ! (*attr)->get_parameters().empty() ) {
+				output << "(";
+				genCommaList( (*attr)->get_parameters().begin(), (*attr)->get_parameters().end() );
+				output << ")";
+			} // if
+		  if ( ++attr == attributes.end() ) break;
+			output << ",";								// separator
+		} // for
+		output << ")) ";
+	} // CodeGenerator::genAttributes
 
 
Index: src/CodeGen/CodeGenerator.h
===================================================================
--- src/CodeGen/CodeGenerator.h	(revision aaa1a99a1950364c6bd2925b2f12dd314caccfeb)
+++ src/CodeGen/CodeGenerator.h	(revision 0c92c9f0632273f81f11622ea9a570797b9c7092)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Tue Dec 13 13:51:53 2016
-// Update Count     : 39
+// Last Modified On : Tue Jan 17 16:55:40 2017
+// Update Count     : 48
 //
 
@@ -114,5 +114,4 @@
 		void extension( Declaration *decl );
 	  private:
-
 		Indenter indent;
 		int cur_indent;
@@ -131,12 +130,11 @@
 	template< class Iterator >
 	void CodeGenerator::genCommaList( Iterator begin, Iterator end ) {
-		if ( begin == end ) return;
-
+	  if ( begin == end ) return;
 		for ( ;; ) {
 			(*begin++)->accept( *this );
-			if ( begin == end ) return;
-			output << ", ";
+		  if ( begin == end ) break;
+			output << ", ";								// separator
 		} // for
-	}
+	} // genCommaList
 
 	inline bool doSemicolon( Declaration* decl ) {
@@ -145,5 +143,5 @@
 		} // if
 		return true;
-	}
+	} // doSemicolon
 
 	/// returns C-compatible name of declaration
