Index: Jenkins/FullBuild
===================================================================
--- Jenkins/FullBuild	(revision a74503ff7be256fa13707bae009cede1f2b079ee)
+++ Jenkins/FullBuild	(revision 846a14770bf3c629a0802f858b7a6bc685947179)
@@ -21,6 +21,4 @@
 					gcc_5_x64: { trigger_build( 'gcc-5',   'x64', false ) },
 					gcc_5_x86: { trigger_build( 'gcc-5',   'x86', false ) },
-					gcc_4_x64: { trigger_build( 'gcc-4.9', 'x64', false ) },
-					gcc_4_x86: { trigger_build( 'gcc-4.9', 'x86', false ) },
 					clang_x64: { trigger_build( 'clang',   'x64', false ) },
 					clang_x86: { trigger_build( 'clang',   'x86', false ) },
Index: src/Common/ScopedMap.h
===================================================================
--- src/Common/ScopedMap.h	(revision a74503ff7be256fa13707bae009cede1f2b079ee)
+++ src/Common/ScopedMap.h	(revision 846a14770bf3c629a0802f858b7a6bc685947179)
@@ -22,22 +22,39 @@
 #include <vector>
 
+/// Default (empty) ScopedMap note type
+struct EmptyNote {};
+
 /// A map where the items are placed into nested scopes;
-/// inserted items are placed into the innermost scope, lookup looks from the innermost scope outward
-template<typename Key, typename Value>
+/// inserted items are placed into the innermost scope, lookup looks from the innermost scope outward.
+/// Scopes may be annotated with a value; the annotation defaults to empty
+template<typename Key, typename Value, typename Note = EmptyNote>
 class ScopedMap {
-	typedef std::map< Key, Value > Scope;
+	typedef std::map< Key, Value > MapType;
+	struct Scope {
+		MapType map;
+		Note note;
+
+		template<typename N>
+		Scope(N&& n) : map(), note(std::forward<N>(n)) {}
+		
+		Scope() = default;
+		Scope(const Scope&) = default;
+		Scope(Scope&&) = default;
+		Scope& operator= (const Scope&) = default;
+		Scope& operator= (Scope&&) = default;
+	};
 	typedef std::vector< Scope > ScopeList;
 
 	ScopeList scopes; ///< scoped list of maps
 public:
-	typedef typename Scope::key_type key_type;
-	typedef typename Scope::mapped_type mapped_type;
-	typedef typename Scope::value_type value_type;
+	typedef typename MapType::key_type key_type;
+	typedef typename MapType::mapped_type mapped_type;
+	typedef typename MapType::value_type value_type;
 	typedef typename ScopeList::size_type size_type;
 	typedef typename ScopeList::difference_type difference_type;
-	typedef typename Scope::reference reference;
-	typedef typename Scope::const_reference const_reference;
-	typedef typename Scope::pointer pointer;
-	typedef typename Scope::const_pointer const_pointer;
+	typedef typename MapType::reference reference;
+	typedef typename MapType::const_reference const_reference;
+	typedef typename MapType::pointer pointer;
+	typedef typename MapType::const_pointer const_pointer;
 
 	class iterator : public std::iterator< std::bidirectional_iterator_tag,
@@ -45,11 +62,11 @@
 	friend class ScopedMap;
 	friend class const_iterator;
-		typedef typename std::map< Key, Value >::iterator wrapped_iterator;
-		typedef typename std::vector< std::map< Key, Value > > scope_list;
+		typedef typename ScopedMap::MapType::iterator wrapped_iterator;
+		typedef typename ScopedMap::ScopeList scope_list;
 		typedef typename scope_list::size_type size_type;
 
 		/// Checks if this iterator points to a valid item
 		bool is_valid() const {
-			return it != (*scopes)[level].end();
+			return it != (*scopes)[level].map.end();
 		}
 
@@ -79,8 +96,8 @@
 
 		iterator& operator++ () {
-			if ( it == (*scopes)[level].end() ) {
+			if ( it == (*scopes)[level].map.end() ) {
 				if ( level == 0 ) return *this;
 				--level;
-				it = (*scopes)[level].begin();
+				it = (*scopes)[level].map.begin();
 			} else {
 				++it;
@@ -92,7 +109,7 @@
 		iterator& operator-- () {
 			// may fail if this is the begin iterator; allowed by STL spec
-			if ( it == (*scopes)[level].begin() ) {
+			if ( it == (*scopes)[level].map.begin() ) {
 				++level;
-				it = (*scopes)[level].end();
+				it = (*scopes)[level].map.end();
 			}
 			--it;
@@ -107,4 +124,7 @@
 
 		size_type get_level() const { return level; }
+
+		Note& get_note() { return (*scopes)[level].note; }
+		const Note& get_note() const { return (*scopes)[level].note; }
 
 	private:
@@ -117,12 +137,12 @@
 	                                             value_type > {
 	friend class ScopedMap;
-		typedef typename std::map< Key, Value >::iterator wrapped_iterator;
-		typedef typename std::map< Key, Value >::const_iterator wrapped_const_iterator;
-		typedef typename std::vector< std::map< Key, Value > > scope_list;
+		typedef typename ScopedMap::MapType::iterator wrapped_iterator;
+		typedef typename ScopedMap::MapType::const_iterator wrapped_const_iterator;
+		typedef typename ScopedMap::ScopeList scope_list;
 		typedef typename scope_list::size_type size_type;
 
 		/// Checks if this iterator points to a valid item
 		bool is_valid() const {
-			return it != (*scopes)[level].end();
+			return it != (*scopes)[level].map.end();
 		}
 
@@ -157,8 +177,8 @@
 
 		const_iterator& operator++ () {
-			if ( it == (*scopes)[level].end() ) {
+			if ( it == (*scopes)[level].map.end() ) {
 				if ( level == 0 ) return *this;
 				--level;
-				it = (*scopes)[level].begin();
+				it = (*scopes)[level].map.begin();
 			} else {
 				++it;
@@ -170,7 +190,7 @@
 		const_iterator& operator-- () {
 			// may fail if this is the begin iterator; allowed by STL spec
-			if ( it == (*scopes)[level].begin() ) {
+			if ( it == (*scopes)[level].map.begin() ) {
 				++level;
-				it = (*scopes)[level].end();
+				it = (*scopes)[level].map.end();
 			}
 			--it;
@@ -185,4 +205,6 @@
 
 		size_type get_level() const { return level; }
+
+		const Note& get_note() const { return (*scopes)[level].note; }
 
 	private:
@@ -197,4 +219,10 @@
 	}
 
+	// Starts a new scope with the given note
+	template<typename N>
+	void beginScope( N&& n ) {
+		scopes.emplace_back( std::forward<N>(n) );
+	}
+
 	/// Ends a scope; invalidates any iterators pointing to elements of that scope
 	void endScope() {
@@ -204,21 +232,29 @@
 
 	/// Default constructor initializes with one scope
-	ScopedMap() { beginScope(); }
-
-	iterator begin() { return iterator(scopes, scopes.back().begin(), currentScope()).next_valid(); }
-	const_iterator begin() const { return const_iterator(scopes, scopes.back().begin(), currentScope()).next_valid(); }
-	const_iterator cbegin() const { return const_iterator(scopes, scopes.back().begin(), currentScope()).next_valid(); }
-	iterator end() { return iterator(scopes, scopes[0].end(), 0); }
-	const_iterator end() const { return const_iterator(scopes, scopes[0].end(), 0); }
-	const_iterator cend() const { return const_iterator(scopes, scopes[0].end(), 0); }
+	ScopedMap() : scopes() { beginScope(); }
+
+	/// Constructs with a given note on the outermost scope
+	template<typename N>
+	ScopedMap( N&& n ) : scopes() { beginScope(std::forward<N>(n)); }
+
+	iterator begin() { return iterator(scopes, scopes.back().map.begin(), currentScope()).next_valid(); }
+	const_iterator begin() const { return const_iterator(scopes, scopes.back().map.begin(), currentScope()).next_valid(); }
+	const_iterator cbegin() const { return const_iterator(scopes, scopes.back().map.begin(), currentScope()).next_valid(); }
+	iterator end() { return iterator(scopes, scopes[0].map.end(), 0); }
+	const_iterator end() const { return const_iterator(scopes, scopes[0].map.end(), 0); }
+	const_iterator cend() const { return const_iterator(scopes, scopes[0].map.end(), 0); }
 
 	/// Gets the index of the current scope (counted from 1)
 	size_type currentScope() const { return scopes.size() - 1; }
+
+	/// Gets the note at the given scope
+	Note& getNote( size_type i ) { return scopes[i].note; }
+	const Note& getNote( size_type i ) const { return scopes[i].note; }
 
 	/// Finds the given key in the outermost scope it occurs; returns end() for none such
 	iterator find( const Key &key ) {
 		for ( size_type i = scopes.size() - 1; ; --i ) {
-			typename Scope::iterator val = scopes[i].find( key );
-			if ( val != scopes[i].end() ) return iterator( scopes, val, i );
+			typename MapType::iterator val = scopes[i].map.find( key );
+			if ( val != scopes[i].map.end() ) return iterator( scopes, val, i );
 			if ( i == 0 ) break;
 		}
@@ -226,15 +262,15 @@
 	}
 	const_iterator find( const Key &key ) const {
-			return const_iterator( const_cast< ScopedMap< Key, Value >* >(this)->find( key ) );
+			return const_iterator( const_cast< ScopedMap< Key, Value, Note >* >(this)->find( key ) );
 	}
 
 	/// Finds the given key in the provided scope; returns end() for none such
 	iterator findAt( size_type scope, const Key& key ) {
-		typename Scope::iterator val = scopes[scope].find( key );
-		if ( val != scopes[scope].end() ) return iterator( scopes, val, scope );
+		typename MapType::iterator val = scopes[scope].map.find( key );
+		if ( val != scopes[scope].map.end() ) return iterator( scopes, val, scope );
 		return end();
 	}
 	const_iterator findAt( size_type scope, const Key& key ) const {
-		return const_iterator( const_cast< ScopedMap< Key, Value >* >(this)->findAt( scope, key ) );
+		return const_iterator( const_cast< ScopedMap< Key, Value, Note >* >(this)->findAt( scope, key ) );
 	}
 
@@ -243,6 +279,6 @@
 		if ( it.level == 0 ) return end();
 		for ( size_type i = it.level - 1; ; --i ) {
-			typename Scope::iterator val = scopes[i].find( key );
-			if ( val != scopes[i].end() ) return iterator( scopes, val, i );
+			typename MapType::iterator val = scopes[i].map.find( key );
+			if ( val != scopes[i].map.end() ) return iterator( scopes, val, i );
 			if ( i == 0 ) break;
 		}
@@ -250,5 +286,5 @@
 	}
 	const_iterator findNext( const_iterator &it, const Key &key ) const {
-			return const_iterator( const_cast< ScopedMap< Key, Value >* >(this)->findNext( it, key ) );
+			return const_iterator( const_cast< ScopedMap< Key, Value, Note >* >(this)->findNext( it, key ) );
 	}
 
@@ -256,5 +292,5 @@
 	template< typename value_type_t >
 	std::pair< iterator, bool > insert( value_type_t&& value ) {
-		std::pair< typename Scope::iterator, bool > res = scopes.back().insert( std::forward<value_type_t>( value ) );
+		std::pair< typename MapType::iterator, bool > res = scopes.back().map.insert( std::forward<value_type_t>( value ) );
 		return std::make_pair( iterator(scopes, std::move( res.first ), scopes.size()-1), std::move( res.second ) );
 	}
@@ -262,6 +298,6 @@
 	template< typename value_type_t >
 	std::pair< iterator, bool > insert( iterator at, value_type_t&& value ) {
-		Scope& scope = (*at.scopes) [ at.level ];
-		std::pair< typename Scope::iterator, bool > res = scope.insert( std::forward<value_type_t>( value ) );
+		MapType& scope = (*at.scopes)[ at.level ].map;
+		std::pair< typename MapType::iterator, bool > res = scope.insert( std::forward<value_type_t>( value ) );
 		return std::make_pair( iterator(scopes, std::move( res.first ), at.level), std::move( res.second ) );
 	}
@@ -272,5 +308,5 @@
 	template< typename value_type_t >
 	std::pair< iterator, bool > insertAt( size_type scope, value_type_t&& value ) {
-		std::pair< typename Scope::iterator, bool > res = scopes.at(scope).insert( std::forward<value_type_t>( value ) );
+		std::pair< typename MapType::iterator, bool > res = scopes.at(scope).map.insert( std::forward<value_type_t>( value ) );
 		return std::make_pair( iterator(scopes, std::move( res.first ), scope), std::move( res.second ) );
 	}
@@ -288,5 +324,5 @@
 
 	iterator erase( iterator pos ) {
-		Scope& scope = (*pos.scopes) [ pos.level ];
+		MapType& scope = (*pos.scopes)[ pos.level ].map;
 		const typename iterator::wrapped_iterator& new_it = scope.erase( pos.it );
 		iterator it( *pos.scopes, new_it, pos.level );
Index: src/Parser/TypedefTable.cc
===================================================================
--- src/Parser/TypedefTable.cc	(revision a74503ff7be256fa13707bae009cede1f2b079ee)
+++ src/Parser/TypedefTable.cc	(revision 846a14770bf3c629a0802f858b7a6bc685947179)
@@ -91,5 +91,5 @@
 
 void TypedefTable::enterScope() {
-	kindTable.beginScope();
+	kindTable.beginScope(0);
 	debugPrint( cerr << "Entering scope " << kindTable.currentScope() << endl; print() );
 } // TypedefTable::enterScope
Index: src/Parser/TypedefTable.h
===================================================================
--- src/Parser/TypedefTable.h	(revision a74503ff7be256fa13707bae009cede1f2b079ee)
+++ src/Parser/TypedefTable.h	(revision 846a14770bf3c629a0802f858b7a6bc685947179)
@@ -23,8 +23,9 @@
 
 class TypedefTable {
-	typedef ScopedMap< std::string, int > KindTable;
+	typedef ScopedMap< std::string, int, int > KindTable;
 	KindTable kindTable;	
-	unsigned int level = 0;
+	unsigned int level;
   public:
+    TypedefTable() : kindTable{0}, level{0} {}
 	~TypedefTable();
 
Index: src/tests/Makefile.am
===================================================================
--- src/tests/Makefile.am	(revision a74503ff7be256fa13707bae009cede1f2b079ee)
+++ src/tests/Makefile.am	(revision 846a14770bf3c629a0802f858b7a6bc685947179)
@@ -17,5 +17,5 @@
 debug=yes
 
-quick_test=avl_test operators numericConstants expression enum array typeof cast dtor-early-exit init_once attributes
+quick_test=avl_test operators numericConstants expression enum array typeof cast attributes
 
 if BUILD_CONCURRENCY
