Index: src/Parser/DeclarationNode.cc
===================================================================
--- src/Parser/DeclarationNode.cc	(revision 68cd1ce1134527e1c664cfdf84df37a7025de8a7)
+++ src/Parser/DeclarationNode.cc	(revision 94e0864d381ec34e8e25850109ea127ff29efbca)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 12:34:05 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sat Jun 13 08:02:03 2015
-// Update Count     : 58
+// Last Modified On : Wed Jun 24 15:29:19 2015
+// Update Count     : 86
 //
 
@@ -24,4 +24,8 @@
 #include "SynTree/Declaration.h"
 #include "SynTree/Expression.h"
+
+#include "Parser.h"
+#include "TypedefTable.h"
+extern TypedefTable typedefTable;
 
 using namespace std;
@@ -177,4 +181,12 @@
 		newnode->type->aggregate->name = DeclarationNode::anonymous.newName();
 	} // if
+
+	// SKULLDUGGERY: generate a typedef for the aggregate name so that the aggregate does not have to be qualified by
+	// "struct"
+	typedefTable.addToEnclosingScope( newnode->type->aggregate->name, TypedefTable::TD );
+	DeclarationNode *typedf = new DeclarationNode;
+	typedf->name = newnode->type->aggregate->name;
+	newnode->appendList( typedf->addType( newnode->clone() )->addTypedef() );
+
 	newnode->type->aggregate->params = formals;
 	newnode->type->aggregate->actuals = actuals;
@@ -191,4 +203,12 @@
 		newnode->type->enumeration->name = DeclarationNode::anonymous.newName();
 	} // if
+
+	// SKULLDUGGERY: generate a typedef for the enumeration name so that the enumeration does not have to be qualified
+	// by "enum"
+	typedefTable.addToEnclosingScope( newnode->type->enumeration->name, TypedefTable::TD );
+	DeclarationNode *typedf = new DeclarationNode;
+	typedf->name = newnode->type->enumeration->name;
+	newnode->appendList( typedf->addType( newnode->clone() )->addTypedef() );
+
 	newnode->type->enumeration->constants = constants;
 	return newnode;
@@ -832,11 +852,11 @@
 Declaration *DeclarationNode::build() const {
 	if ( type ) {
-		Declaration *newDecl = type->buildDecl( name, buildStorageClass(), maybeBuild< Expression >( bitfieldWidth ), buildInline(), linkage, maybeBuild< Initializer >(initializer) );
+		Declaration *newDecl = type->buildDecl( name, buildStorageClass(), maybeBuild< Expression >( bitfieldWidth ), buildFuncSpecifier( Inline ), buildFuncSpecifier( Noreturn ), linkage, maybeBuild< Initializer >(initializer) );
 		return newDecl;
 	} // if
-	if ( ! buildInline() ) {
+	if ( ! buildFuncSpecifier( Inline ) && ! buildFuncSpecifier( Noreturn ) ) {
 		return new ObjectDecl( name, buildStorageClass(), linkage, maybeBuild< Expression >( bitfieldWidth ), 0, maybeBuild< Initializer >( initializer ) );
 	} // if
-	throw SemanticError( "invalid inline specification in declaration of ", this );
+	throw SemanticError( "invalid function specifier in declaration of ", this );
 }
 
@@ -879,5 +899,4 @@
 	for ( std::list< DeclarationNode::StorageClass >::const_iterator i = storageClasses.begin(); i != storageClasses.end(); ++i ) {
 	  if ( *i == DeclarationNode::Inline || *i == DeclarationNode::Noreturn ) continue; // ignore function specifiers
-
 	  if ( ret != DeclarationNode::NoStorageClass ) {	// already have a valid storage class ?
 			throw SemanticError( "invalid combination of storage classes in declaration of ", this );
@@ -888,10 +907,10 @@
 }
 
-bool DeclarationNode::buildInline() const {
-	std::list< DeclarationNode::StorageClass >::const_iterator first = std::find( storageClasses.begin(), storageClasses.end(), DeclarationNode::Inline );
-  if ( first == storageClasses.end() ) return false;
-	std::list< DeclarationNode::StorageClass >::const_iterator next = std::find( ++first, storageClasses.end(), DeclarationNode::Inline );
-  if ( next == storageClasses.end() ) return true;
-	throw SemanticError( "duplicate inline specification in declaration of ", this );
+bool DeclarationNode::buildFuncSpecifier( DeclarationNode::StorageClass key ) const {
+	std::list< DeclarationNode::StorageClass >::const_iterator first = std::find( storageClasses.begin(), storageClasses.end(), key );
+  if ( first == storageClasses.end() ) return false;	// not found
+	first = std::find( ++first, storageClasses.end(), key ); // found
+  if ( first == storageClasses.end() ) return true;		// not found again
+	throw SemanticError( "duplicate function specifier in declaration of ", this );
 }
 
