Index: translator/SynTree/BasicType.cc
===================================================================
--- translator/SynTree/BasicType.cc	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
+++ translator/SynTree/BasicType.cc	(revision 17cd4ebabb684710b2f3698449093c4e84b8fb70)
@@ -1,9 +1,2 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: BasicType.cc,v 1.10 2005/08/29 20:59:25 rcbilson Exp $
- *
- */
-
 #include <cassert>
 
@@ -11,17 +4,12 @@
 
 
-BasicType::BasicType( const Type::Qualifiers &tq, Kind bt )
-    : Type( tq ), kind( bt )
-{
-}
+BasicType::BasicType( const Type::Qualifiers &tq, Kind bt ) : Type( tq ), kind( bt ) {}
 
-void
-BasicType::print( std::ostream &os, int indent ) const
-{
+void BasicType::print( std::ostream &os, int indent ) const {
     static const char *kindNames[] = {	
-	"bool", "char", "signed char", "unsigned char", "short signed int", "short unsigned int",
+	"_Bool", "char", "signed char", "unsigned char", "short signed int", "short unsigned int",
 	"signed int", "unsigned int", "long signed int", "long unsigned int", "long long signed int",
-	"long long unsigned int", "float", "double", "long double", "float complex", "double complex",
-	"long double complex", "float imaginary", "double imaginary", "long double imaginary"
+	"long long unsigned int", "float", "double", "long double", "float _Complex", "double _Complex",
+	"long double _Complex", "float _Imaginary", "double _Imaginary", "long double _Imaginary"
     };
 
@@ -30,34 +18,32 @@
 }
 
-bool 
-BasicType::isInteger() const
-{
+bool BasicType::isInteger() const {
     switch( kind ) {
-    case Bool:
-    case Char:
-    case SignedChar:
-    case UnsignedChar:
-    case ShortSignedInt:
-    case ShortUnsignedInt:
-    case SignedInt:
-    case UnsignedInt:
-    case LongSignedInt:
-    case LongUnsignedInt:
-    case LongLongSignedInt:
-    case LongLongUnsignedInt:
+      case Bool:
+      case Char:
+      case SignedChar:
+      case UnsignedChar:
+      case ShortSignedInt:
+      case ShortUnsignedInt:
+      case SignedInt:
+      case UnsignedInt:
+      case LongSignedInt:
+      case LongUnsignedInt:
+      case LongLongSignedInt:
+      case LongLongUnsignedInt:
 	return true;
 
-    case Float:
-    case Double:
-    case LongDouble:
-    case FloatComplex:
-    case DoubleComplex:
-    case LongDoubleComplex:
-    case FloatImaginary:
-    case DoubleImaginary:
-    case LongDoubleImaginary:
+      case Float:
+      case Double:
+      case LongDouble:
+      case FloatComplex:
+      case DoubleComplex:
+      case LongDoubleComplex:
+      case FloatImaginary:
+      case DoubleImaginary:
+      case LongDoubleImaginary:
 	return false;
 
-    case NUMBER_OF_BASIC_TYPES:
+      case NUMBER_OF_BASIC_TYPES:
 	assert( false );
     }
Index: translator/SynTree/Declaration.h
===================================================================
--- translator/SynTree/Declaration.h	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
+++ translator/SynTree/Declaration.h	(revision 17cd4ebabb684710b2f3698449093c4e84b8fb70)
@@ -1,9 +1,2 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: Declaration.h,v 1.22 2005/08/29 20:59:25 rcbilson Exp $
- *
- */
-
 #ifndef DECLARATION_H
 #define DECLARATION_H
@@ -15,9 +8,7 @@
 
 
-class Declaration
-{
-public:
-    enum StorageClass
-    {  
+class Declaration {
+  public:
+    enum StorageClass {  
 	NoStorageClass,
 	Auto,
@@ -27,5 +18,5 @@
 	Fortran
     };	
-    
+
     Declaration( const std::string &name, StorageClass sc, LinkageSpec::Type linkage );
     Declaration( const Declaration &other );
@@ -39,5 +30,5 @@
     void set_linkage( LinkageSpec::Type newValue ) { linkage = newValue; }
     UniqueId get_uniqueId() const { return uniqueId; }
-    
+
     void fixUniqueId( void );
     virtual Declaration *clone() const = 0;
@@ -46,11 +37,10 @@
     virtual void print( std::ostream &os, int indent = 0 ) const = 0;
     virtual void printShort( std::ostream &os, int indent = 0 ) const = 0;
-    
+
     static const char* storageClassName[];  
-    
+
     static void dumpIds( std::ostream &os );
     static Declaration *declFromId( UniqueId id );
-    
-private:
+  private:
     std::string name;
     StorageClass storageClass;
@@ -59,7 +49,6 @@
 };
 
-class DeclarationWithType : public Declaration
-{
-public:
+class DeclarationWithType : public Declaration {
+  public:
     DeclarationWithType( const std::string &name, StorageClass sc, LinkageSpec::Type linkage );
     DeclarationWithType( const DeclarationWithType &other );
@@ -68,22 +57,18 @@
     std::string get_mangleName() const { return mangleName; }
     void set_mangleName( std::string newValue ) { mangleName = newValue; }
-    
+
     virtual DeclarationWithType *clone() const = 0;
     virtual DeclarationWithType *acceptMutator( Mutator &m ) = 0;
-    
+
     virtual Type *get_type() const = 0;
     virtual void set_type(Type *) = 0;
-    
-private:
-    // this represents the type with all types and typedefs expanded
-    // it is generated by SymTab::Validate::Pass2
+  private:
+    // this represents the type with all types and typedefs expanded it is generated by SymTab::Validate::Pass2
     std::string mangleName;
 };
 
-class ObjectDecl : public DeclarationWithType
-{
+class ObjectDecl : public DeclarationWithType {
     typedef DeclarationWithType Parent;
-
-public:
+  public:
     ObjectDecl( const std::string &name, StorageClass sc, LinkageSpec::Type linkage, Expression *bitfieldWidth, Type *type, Initializer *init );
     ObjectDecl( const ObjectDecl &other );
@@ -97,5 +82,5 @@
     Expression *get_bitfieldWidth() const { return bitfieldWidth; }
     void set_bitfieldWidth( Expression *newValue ) { bitfieldWidth = newValue; }
-    
+
     virtual ObjectDecl *clone() const { return new ObjectDecl( *this ); }
     virtual void accept( Visitor &v ) { v.visit( this ); }
@@ -103,6 +88,5 @@
     virtual void print( std::ostream &os, int indent = 0 ) const;
     virtual void printShort( std::ostream &os, int indent = 0 ) const;
-    
-private:
+  private:
     Type *type;
     Initializer *init;
@@ -110,9 +94,7 @@
 };
 
-class FunctionDecl : public DeclarationWithType
-{
+class FunctionDecl : public DeclarationWithType {
     typedef DeclarationWithType Parent;
-
-public:
+  public:
     FunctionDecl( const std::string &name, StorageClass sc, LinkageSpec::Type linkage, FunctionType *type, CompoundStmt *statements, bool isInline );
     FunctionDecl( const FunctionDecl &other );
@@ -130,5 +112,5 @@
     std::list< std::string >& get_oldIdents() { return oldIdents; }
     std::list< Declaration* >& get_oldDecls() { return oldDecls; }
-    
+
     virtual FunctionDecl *clone() const { return new FunctionDecl( *this ); }
     virtual void accept( Visitor &v ) { v.visit( this ); }
@@ -136,6 +118,5 @@
     virtual void print( std::ostream &os, int indent = 0 ) const;
     virtual void printShort( std::ostream &os, int indent = 0 ) const;
-    
-private:
+  private:
     FunctionType *type;
     CompoundStmt *statements;
@@ -145,9 +126,7 @@
 };
 
-class NamedTypeDecl : public Declaration
-{
+class NamedTypeDecl : public Declaration {
     typedef Declaration Parent;
-
-public:
+  public:
     NamedTypeDecl( const std::string &name, StorageClass sc, Type *type );
     NamedTypeDecl( const TypeDecl &other );
@@ -162,9 +141,7 @@
     virtual void print( std::ostream &os, int indent = 0 ) const;
     virtual void printShort( std::ostream &os, int indent = 0 ) const;
-    
-protected:
+  protected:
     virtual std::string typeString() const = 0;
-    
-private:
+  private:
     Type *base;
     std::list< TypeDecl* > parameters;
@@ -172,14 +149,12 @@
 };
 
-class TypeDecl : public NamedTypeDecl
-{
+class TypeDecl : public NamedTypeDecl {
     typedef NamedTypeDecl Parent;
-
-public:
+  public:
     enum Kind { Any, Dtype, Ftype };
 
     TypeDecl( const std::string &name, StorageClass sc, Type *type, Kind kind );
     TypeDecl( const TypeDecl &other );
-    
+
     Kind get_kind() const { return kind; }
 
@@ -187,31 +162,25 @@
     virtual void accept( Visitor &v ) { v.visit( this ); }
     virtual TypeDecl *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-
-private:
+  private:
     virtual std::string typeString() const;
     Kind kind;
 };
-    
-class TypedefDecl : public NamedTypeDecl
-{
+
+class TypedefDecl : public NamedTypeDecl {
     typedef NamedTypeDecl Parent;
-
-public:
+  public:
     TypedefDecl( const std::string &name, StorageClass sc, Type *type ) : Parent( name, sc, type ) {}
     TypedefDecl( const TypedefDecl &other ) : Parent( other ) {}
-    
+
     virtual TypedefDecl *clone() const { return new TypedefDecl( *this ); }
     virtual void accept( Visitor &v ) { v.visit( this ); }
     virtual Declaration *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-
-private:
-    virtual std::string typeString() const;
-};
-    
-class AggregateDecl : public Declaration
-{
+  private:
+    virtual std::string typeString() const;
+};
+
+class AggregateDecl : public Declaration {
     typedef Declaration Parent;
-
-public:
+  public:
     AggregateDecl( const std::string &name );
     AggregateDecl( const AggregateDecl &other );
@@ -220,81 +189,67 @@
     std::list<Declaration*>& get_members() { return members; }
     std::list<TypeDecl*>& get_parameters() { return parameters; }
-    
-    virtual void print( std::ostream &os, int indent = 0 ) const;
-    virtual void printShort( std::ostream &os, int indent = 0 ) const;
-
-protected:
+
+    virtual void print( std::ostream &os, int indent = 0 ) const;
+    virtual void printShort( std::ostream &os, int indent = 0 ) const;
+  protected:
     virtual std::string typeString() const = 0;
-    
-private:
+
+  private:
     std::list<Declaration*> members;
     std::list<TypeDecl*> parameters;
 };
 
-class StructDecl : public AggregateDecl
-{
-    typedef AggregateDecl Parent;
-
-public:
+class StructDecl : public AggregateDecl {
+    typedef AggregateDecl Parent;
+  public:
     StructDecl( const std::string &name ) : Parent( name ) {}
     StructDecl( const StructDecl &other ) : Parent( other ) {}
-    
+
     virtual StructDecl *clone() const { return new StructDecl( *this ); }
     virtual void accept( Visitor &v ) { v.visit( this ); }
     virtual Declaration *acceptMutator( Mutator &m ) { return m.mutate( this ); }
 
-private:
-    virtual std::string typeString() const;
-};
-    
-class UnionDecl : public AggregateDecl
-{
-    typedef AggregateDecl Parent;
-
-public:
+  private:
+    virtual std::string typeString() const;
+};
+
+class UnionDecl : public AggregateDecl {
+    typedef AggregateDecl Parent;
+  public:
     UnionDecl( const std::string &name ) : Parent( name ) {}
     UnionDecl( const UnionDecl &other ) : Parent( other ) {}
-    
+
     virtual UnionDecl *clone() const { return new UnionDecl( *this ); }
     virtual void accept( Visitor &v ) { v.visit( this ); }
     virtual Declaration *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-
-private:
-    virtual std::string typeString() const;
-};
-    
-class EnumDecl : public AggregateDecl
-{
-    typedef AggregateDecl Parent;
-
-public:
+  private:
+    virtual std::string typeString() const;
+};
+
+class EnumDecl : public AggregateDecl {
+    typedef AggregateDecl Parent;
+  public:
     EnumDecl( const std::string &name ) : Parent( name ) {}
     EnumDecl( const EnumDecl &other ) : Parent( other ) {}
-    
+
     virtual EnumDecl *clone() const { return new EnumDecl( *this ); }
     virtual void accept( Visitor &v ) { v.visit( this ); }
     virtual Declaration *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-
-private:
-    virtual std::string typeString() const;
-};
-    
-class ContextDecl : public AggregateDecl
-{
-    typedef AggregateDecl Parent;
-
-public:
+  private:
+    virtual std::string typeString() const;
+};
+
+class ContextDecl : public AggregateDecl {
+    typedef AggregateDecl Parent;
+  public:
     ContextDecl( const std::string &name ) : Parent( name ) {}
     ContextDecl( const ContextDecl &other ) : Parent( other ) {}
-    
+
     virtual ContextDecl *clone() const { return new ContextDecl( *this ); }
     virtual void accept( Visitor &v ) { v.visit( this ); }
     virtual Declaration *acceptMutator( Mutator &m ) { return m.mutate( this ); }
-
-private:
-    virtual std::string typeString() const;
-};
-    
-
-
-#endif /* #ifndef DECLARATION_H */
+  private:
+    virtual std::string typeString() const;
+};
+
+#endif // DECLARATION_H
Index: translator/SynTree/NamedTypeDecl.cc
===================================================================
--- translator/SynTree/NamedTypeDecl.cc	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
+++ translator/SynTree/NamedTypeDecl.cc	(revision 17cd4ebabb684710b2f3698449093c4e84b8fb70)
@@ -6,6 +6,5 @@
 NamedTypeDecl::NamedTypeDecl( const std::string &name, StorageClass sc, Type *base )
     : Parent( name, sc, LinkageSpec::Cforall ), base( base )
-{
-}
+{}
 
 NamedTypeDecl::NamedTypeDecl( const TypeDecl &other )
@@ -16,6 +15,5 @@
 }
 
-NamedTypeDecl::~NamedTypeDecl()
-{
+NamedTypeDecl::~NamedTypeDecl() {
     delete base;
     deleteAll( parameters );
@@ -23,52 +21,47 @@
 }
 
-void 
-NamedTypeDecl::print( std::ostream &os, int indent ) const
-{
+void NamedTypeDecl::print( std::ostream &os, int indent ) const {
     using namespace std;
     
-    if( get_name() != "" ) {
+    if ( get_name() != "" ) {
 	os << get_name() << ": a ";
-    }
-    if( get_storageClass() != NoStorageClass ) {
+    } // if
+    if ( get_storageClass() != NoStorageClass ) {
 	os << storageClassName[ get_storageClass() ] << ' ';
-    }
+    } // if
     os << typeString();
-    if( base ) {
+    if ( base ) {
 	os << " for ";
 	base->print( os, indent );
-    }
-    if( !parameters.empty() ) {
+    } // if
+    if ( !parameters.empty() ) {
 	os << endl << string( indent, ' ' ) << "with parameters" << endl;
 	printAll( parameters, os, indent+2 );
-    }
-    if( !assertions.empty() ) {
+    } // if
+    if ( !assertions.empty() ) {
 	os << endl << string( indent, ' ' ) << "with assertions" << endl;
 	printAll( assertions, os, indent+2 );
-    }
+    } // if
 }
 
-void 
-NamedTypeDecl::printShort( std::ostream &os, int indent ) const
-{
+void NamedTypeDecl::printShort( std::ostream &os, int indent ) const {
     using namespace std;
     
-    if( get_name() != "" ) {
+    if ( get_name() != "" ) {
 	os << get_name() << ": a ";
-    }
-    if( get_storageClass() != NoStorageClass ) {
+    } // if
+    if ( get_storageClass() != NoStorageClass ) {
 	os << storageClassName[ get_storageClass() ] << ' ';
-    }
+    } // if
     os << typeString();
-    if( base ) {
+    if ( base ) {
 	os << " for ";
 	base->print( os, indent );
-    }
-    if( !parameters.empty() ) {
+    } // if
+    if ( !parameters.empty() ) {
 	os << endl << string( indent, ' ' ) << "with parameters" << endl;
 	printAll( parameters, os, indent+2 );
-    }
+    } // if
 }
 
 std::string TypedefDecl::typeString() const { return "typedef"; }
-    
Index: translator/SynTree/Type.cc
===================================================================
--- translator/SynTree/Type.cc	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
+++ translator/SynTree/Type.cc	(revision 17cd4ebabb684710b2f3698449093c4e84b8fb70)
@@ -1,9 +1,2 @@
-/*
- * This file is part of the Cforall project
- *
- * $Id: Type.cc,v 1.6 2005/08/29 20:59:26 rcbilson Exp $
- *
- */
-
 #include "SynTree.h"
 #include "Visitor.h"
@@ -12,41 +5,55 @@
 #include "utility.h"
 
+const char *BasicType::typeNames[BasicType::NUMBER_OF_BASIC_TYPES] = {
+    "_Bool",
+    "char",
+    "char",
+    "unsigned char",
+    "short",
+    "short unsigned",
+    "int",
+    "unsigned int",
+    "long int",
+    "long unsigned int",
+    "long long int",
+    "long long unsigned int",
+    "float",
+    "double",
+    "long double",
+    "float _Complex",
+    "double _Complex",
+    "long double _Complex",
+    "float _Imaginary",
+    "double _Imaginary",
+    "long double _Imaginary",
+};
 
-Type::Type( const Qualifiers &tq )
-    : tq( tq )
-{
-}
+Type::Type( const Qualifiers &tq ) : tq( tq ) {}
 
-Type::Type( const Type &other )
-    : tq( other.tq )
-{
+Type::Type( const Type &other ) : tq( other.tq ) {
     cloneAll( other.forall, forall );
 }
 
-Type::~Type()
-{
+Type::~Type() {
     deleteAll( forall );
 }
 
-void
-Type::print( std::ostream &os, int indent ) const
-{
-    if( !forall.empty() ) {
+void Type::print( std::ostream &os, int indent ) const {
+    if ( !forall.empty() ) {
 	os << "forall" << std::endl;
 	printAll( forall, os, indent + 4 );
 	os << std::string( indent+2, ' ' );
-    }
-    if( tq.isConst ) {
+    } // if
+    if ( tq.isConst ) {
 	os << "const ";
-    }
-    if( tq.isVolatile ) {
+    } // if
+    if ( tq.isVolatile ) {
 	os << "volatile ";
-    }
-    if( tq.isRestrict ) {
+    } // if
+    if ( tq.isRestrict ) {
 	os << "restrict ";
-    }
-    if( tq.isLvalue ) {
+    } // if
+    if ( tq.isLvalue ) {
 	os << "lvalue ";
-    }
+    } // if
 }
-
Index: translator/SynTree/Type.h
===================================================================
--- translator/SynTree/Type.h	(revision d9a0e763800888addddd70d8848a8f432b825e4b)
+++ translator/SynTree/Type.h	(revision 17cd4ebabb684710b2f3698449093c4e84b8fb70)
@@ -90,4 +90,6 @@
     };  
 
+    static const char *typeNames[];			// string names for basic types, MUST MATCH with Kind
+
     BasicType( const Type::Qualifiers &tq, Kind bt );
 
