Index: src/SynTree/Declaration.h
===================================================================
--- src/SynTree/Declaration.h	(revision cb4c607c4212505e28b756e33cdf1030b6bd93e8)
+++ src/SynTree/Declaration.h	(revision 346a0bf2eeb59ac7742dbcb818d4d60e92658178)
@@ -5,10 +5,10 @@
 // file "LICENCE" distributed with Cforall.
 //
-// Declaration.h -- 
+// Declaration.h --
 //
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Mar  2 17:28:11 2016
+// Last Modified By : Rob Schluntz
+// Last Modified On : Fri May 06 15:39:02 2016
 // Update Count     : 33
 //
@@ -106,5 +106,17 @@
 	typedef DeclarationWithType Parent;
   public:
-	FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Type linkage, FunctionType *type, CompoundStmt *statements, bool isInline, bool isNoreturn );
+	// temporary - merge this into general GCC attributes
+	struct Attribute {
+		enum Type {
+			NoAttribute, Constructor, Destructor,
+		} type;
+		enum Priority {
+			// priorities 0-100 are reserved by gcc, so it's okay to use 100 an exceptional case
+			Default = 100, High,
+		} priority;
+		Attribute(Type t = NoAttribute, Priority p = Default) : type(t), priority(p) {};
+	};
+
+	FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Type linkage, FunctionType *type, CompoundStmt *statements, bool isInline, bool isNoreturn, Attribute attribute = Attribute() );
 	FunctionDecl( const FunctionDecl &other );
 	virtual ~FunctionDecl();
@@ -119,4 +131,6 @@
 	std::list< std::string >& get_oldIdents() { return oldIdents; }
 	std::list< Declaration* >& get_oldDecls() { return oldDecls; }
+	Attribute get_attribute() const { return attribute; }
+	void set_attribute( Attribute newValue ) { attribute = newValue; }
 
 	virtual FunctionDecl *clone() const { return new FunctionDecl( *this ); }
@@ -130,4 +144,5 @@
 	std::list< std::string > oldIdents;
 	std::list< Declaration* > oldDecls;
+	Attribute attribute;
 };
 
Index: src/SynTree/FunctionDecl.cc
===================================================================
--- src/SynTree/FunctionDecl.cc	(revision cb4c607c4212505e28b756e33cdf1030b6bd93e8)
+++ src/SynTree/FunctionDecl.cc	(revision 346a0bf2eeb59ac7742dbcb818d4d60e92658178)
@@ -5,10 +5,10 @@
 // file "LICENCE" distributed with Cforall.
 //
-// FunctionDecl.cc -- 
+// FunctionDecl.cc --
 //
 // Author           : Richard C. Bilson
 // Created On       : Mon May 18 07:44:20 2015
-// Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Jul 13 18:11:44 2015
+// Last Modified By : Rob Schluntz
+// Last Modified On : Fri May 06 15:41:05 2016
 // Update Count     : 19
 //
@@ -21,6 +21,6 @@
 #include "Common/utility.h"
 
-FunctionDecl::FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Type linkage, FunctionType *type, CompoundStmt *statements, bool isInline, bool isNoreturn )
-		: Parent( name, sc, linkage ), type( type ), statements( statements ) {
+FunctionDecl::FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Type linkage, FunctionType *type, CompoundStmt *statements, bool isInline, bool isNoreturn, Attribute attribute )
+		: Parent( name, sc, linkage ), type( type ), statements( statements ), attribute( attribute ) {
 	set_isInline( isInline );
 	set_isNoreturn( isNoreturn );
@@ -32,5 +32,5 @@
 
 FunctionDecl::FunctionDecl( const FunctionDecl &other )
-	: Parent( other ), type( maybeClone( other.type ) ), statements( maybeClone( other.statements ) ) {
+	: Parent( other ), type( maybeClone( other.type ) ), statements( maybeClone( other.statements ) ), attribute( other.attribute ) {
 }
 
@@ -52,5 +52,5 @@
 	using std::endl;
 	using std::string;
-	
+
 	if ( get_name() != "" ) {
 		os << get_name() << ": ";
@@ -65,4 +65,17 @@
 		os << "_Noreturn ";
 	} // if
+	switch ( attribute.type ) {
+		case Attribute::Constructor:
+			os << "Global Constructor ";
+			break;
+		case Attribute::Destructor:
+			os << "Global Destructor ";
+			break;
+		default:
+			break;
+	}
+	if ( attribute.priority != Attribute::Default ) {
+		os << "with priority " << attribute.priority << " ";
+	}
 	if ( get_storageClass() != DeclarationNode::NoStorageClass ) {
 		os << DeclarationNode::storageName[ get_storageClass() ] << ' ';
@@ -94,5 +107,5 @@
 	using std::endl;
 	using std::string;
-	
+
 	if ( get_name() != "" ) {
 		os << get_name() << ": ";
@@ -104,4 +117,17 @@
 		os << "_Noreturn ";
 	} // if
+	switch ( attribute.type ) {
+		case Attribute::Constructor:
+			os << " Global Constructor ";
+			break;
+		case Attribute::Destructor:
+			os << " Global Destructor ";
+			break;
+		default:
+			break;
+	}
+	if ( attribute.priority != Attribute::Default ) {
+		os << "with priority " << attribute.priority << " ";
+	}
 	if ( get_storageClass() != DeclarationNode::NoStorageClass ) {
 		os << DeclarationNode::storageName[ get_storageClass() ] << ' ';
