Index: src/AST/Convert.cpp
===================================================================
--- src/AST/Convert.cpp	(revision 608339278c9d18f727c240a3f4fd3727746d28f3)
+++ src/AST/Convert.cpp	(revision 2d019af1e5dc0df0ad2bbe9c215b4c34968890c0)
@@ -9,7 +9,7 @@
 // Author           : Thierry Delisle
 // Created On       : Thu May 09 15::37::05 2019
-// Last Modified By : Andrew Beach
-// Last Modified On : Thr Nov 12 10:07:00 2020
-// Update Count     : 34
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Fri Mar 12 18:43:51 2021
+// Update Count     : 36
 //
 
@@ -327,4 +327,10 @@
 	const ast::AsmDecl * visit( const ast::AsmDecl * node ) override final {
 		auto decl = new AsmDecl( get<AsmStmt>().accept1( node->stmt ) );
+		declPostamble( decl, node );
+		return nullptr;
+	}
+
+	const ast::DirectiveDecl * visit( const ast::DirectiveDecl * node ) override final {
+		auto decl = new DirectiveDecl( get<DirectiveStmt>().accept1( node->stmt ) );
 		declPostamble( decl, node );
 		return nullptr;
@@ -1769,4 +1775,16 @@
 	}
 
+	virtual void visit( const DirectiveDecl * old ) override final {
+		auto decl = new ast::DirectiveDecl{
+			old->location,
+			GET_ACCEPT_1(stmt, DirectiveStmt)
+		};
+		decl->extension  = old->extension;
+		decl->uniqueId   = old->uniqueId;
+		decl->storage    = { old->storageClasses.val };
+
+		this->node = decl;
+	}
+
 	virtual void visit( const StaticAssertDecl * old ) override final {
 		auto decl = new ast::StaticAssertDecl{
Index: src/AST/Decl.hpp
===================================================================
--- src/AST/Decl.hpp	(revision 608339278c9d18f727c240a3f4fd3727746d28f3)
+++ src/AST/Decl.hpp	(revision 2d019af1e5dc0df0ad2bbe9c215b4c34968890c0)
@@ -10,6 +10,6 @@
 // Created On       : Thu May 9 10:00:00 2019
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Jan 11 20:48:38 2021
-// Update Count     : 30
+// Last Modified On : Fri Mar 12 18:25:05 2021
+// Update Count     : 32
 //
 
@@ -365,4 +365,18 @@
 };
 
+/// C-preprocessor directive `#...`
+class DirectiveDecl : public Decl {
+public:
+	ptr<DirectiveStmt> stmt;
+
+	DirectiveDecl( const CodeLocation & loc, DirectiveStmt * stmt )
+	: Decl( loc, "", {}, {} ), stmt(stmt) {}
+
+	const DirectiveDecl * accept( Visitor & v ) const override { return v.visit( this ); }
+private:
+	DirectiveDecl * clone() const override { return new DirectiveDecl( *this ); }
+	MUTATE_FRIEND
+};
+
 class StaticAssertDecl : public Decl {
 public:
Index: src/AST/Fwd.hpp
===================================================================
--- src/AST/Fwd.hpp	(revision 608339278c9d18f727c240a3f4fd3727746d28f3)
+++ src/AST/Fwd.hpp	(revision 2d019af1e5dc0df0ad2bbe9c215b4c34968890c0)
@@ -9,7 +9,7 @@
 // Author           : Andrew Beach
 // Created On       : Wed May  8 16:05:00 2019
-// Last Modified By : Andrew Beach
-// Last Modified On : Thr Jul 23 14:15:00 2020
-// Update Count     : 2
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Fri Mar 12 18:37:39 2021
+// Update Count     : 4
 //
 
@@ -35,4 +35,5 @@
 class TypedefDecl;
 class AsmDecl;
+class DirectiveDecl;
 class StaticAssertDecl;
 
Index: src/AST/Node.cpp
===================================================================
--- src/AST/Node.cpp	(revision 608339278c9d18f727c240a3f4fd3727746d28f3)
+++ src/AST/Node.cpp	(revision 2d019af1e5dc0df0ad2bbe9c215b4c34968890c0)
@@ -9,7 +9,7 @@
 // Author           : Thierry Delisle
 // Created On       : Thu May 16 14:16:00 2019
-// Last Modified By : Andrew Beach
-// Last Modified On : Fri Jun  5 10:21:00 2020
-// Update Count     : 1
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Fri Mar 12 18:25:06 2021
+// Update Count     : 2
 //
 
@@ -130,4 +130,6 @@
 template class ast::ptr_base< ast::AsmDecl, ast::Node::ref_type::weak >;
 template class ast::ptr_base< ast::AsmDecl, ast::Node::ref_type::strong >;
+template class ast::ptr_base< ast::DirectiveDecl, ast::Node::ref_type::weak >;
+template class ast::ptr_base< ast::DirectiveDecl, ast::Node::ref_type::strong >;
 template class ast::ptr_base< ast::StaticAssertDecl, ast::Node::ref_type::weak >;
 template class ast::ptr_base< ast::StaticAssertDecl, ast::Node::ref_type::strong >;
Index: src/AST/Pass.hpp
===================================================================
--- src/AST/Pass.hpp	(revision 608339278c9d18f727c240a3f4fd3727746d28f3)
+++ src/AST/Pass.hpp	(revision 2d019af1e5dc0df0ad2bbe9c215b4c34968890c0)
@@ -139,4 +139,5 @@
 	const ast::Decl *             visit( const ast::TypedefDecl          * ) override final;
 	const ast::AsmDecl *          visit( const ast::AsmDecl              * ) override final;
+	const ast::DirectiveDecl *    visit( const ast::DirectiveDecl        * ) override final;
 	const ast::StaticAssertDecl * visit( const ast::StaticAssertDecl     * ) override final;
 	const ast::CompoundStmt *     visit( const ast::CompoundStmt         * ) override final;
Index: src/AST/Pass.impl.hpp
===================================================================
--- src/AST/Pass.impl.hpp	(revision 608339278c9d18f727c240a3f4fd3727746d28f3)
+++ src/AST/Pass.impl.hpp	(revision 2d019af1e5dc0df0ad2bbe9c215b4c34968890c0)
@@ -646,4 +646,17 @@
 
 //--------------------------------------------------------------------------
+// DirectiveDecl
+template< typename core_t >
+const ast::DirectiveDecl * ast::Pass< core_t >::visit( const ast::DirectiveDecl * node ) {
+	VISIT_START( node );
+
+	VISIT(
+		maybe_accept( node, &DirectiveDecl::stmt );
+	)
+
+	VISIT_END( DirectiveDecl, node );
+}
+
+//--------------------------------------------------------------------------
 // StaticAssertDecl
 template< typename core_t >
Index: src/AST/Print.cpp
===================================================================
--- src/AST/Print.cpp	(revision 608339278c9d18f727c240a3f4fd3727746d28f3)
+++ src/AST/Print.cpp	(revision 2d019af1e5dc0df0ad2bbe9c215b4c34968890c0)
@@ -387,4 +387,9 @@
 
 	virtual const ast::AsmDecl * visit( const ast::AsmDecl * node ) override final {
+		safe_print( node->stmt );
+		return node;
+	}
+
+	virtual const ast::DirectiveDecl * visit( const ast::DirectiveDecl * node ) override final {
 		safe_print( node->stmt );
 		return node;
Index: src/AST/Visitor.hpp
===================================================================
--- src/AST/Visitor.hpp	(revision 608339278c9d18f727c240a3f4fd3727746d28f3)
+++ src/AST/Visitor.hpp	(revision 2d019af1e5dc0df0ad2bbe9c215b4c34968890c0)
@@ -9,7 +9,7 @@
 // Author           : Andrew Beach
 // Created On       : Thr May 9 15:28:00 2019
-// Last Modified By : Andrew Beach
-// Last Modified On : Thr May 9 15:33:00 2019
-// Update Count     : 0
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Fri Mar 12 18:25:07 2021
+// Update Count     : 1
 //
 
@@ -31,4 +31,5 @@
     virtual const ast::Decl *             visit( const ast::TypedefDecl          * ) = 0;
     virtual const ast::AsmDecl *          visit( const ast::AsmDecl              * ) = 0;
+    virtual const ast::DirectiveDecl *    visit( const ast::DirectiveDecl        * ) = 0;
     virtual const ast::StaticAssertDecl * visit( const ast::StaticAssertDecl     * ) = 0;
     virtual const ast::CompoundStmt *     visit( const ast::CompoundStmt         * ) = 0;
Index: src/CodeGen/CodeGenerator.cc
===================================================================
--- src/CodeGen/CodeGenerator.cc	(revision 608339278c9d18f727c240a3f4fd3727746d28f3)
+++ src/CodeGen/CodeGenerator.cc	(revision 2d019af1e5dc0df0ad2bbe9c215b4c34968890c0)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sun Feb 16 08:32:48 2020
-// Update Count     : 532
+// Last Modified On : Fri Mar 12 19:00:42 2021
+// Update Count     : 536
 //
 #include "CodeGenerator.h"
@@ -935,4 +935,8 @@
 		if ( asmStmt->get_instruction() ) asmStmt->get_instruction()->accept( *visitor );
 		output << " )";
+	}
+
+	void CodeGenerator::postvisit( DirectiveDecl * directiveDecl ) {
+		output << endl << directiveDecl->get_stmt()->directive;	// endl prevents spaces before directive
 	}
 
Index: src/CodeGen/CodeGenerator.h
===================================================================
--- src/CodeGen/CodeGenerator.h	(revision 608339278c9d18f727c240a3f4fd3727746d28f3)
+++ src/CodeGen/CodeGenerator.h	(revision 2d019af1e5dc0df0ad2bbe9c215b4c34968890c0)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sun Feb 16 03:58:31 2020
-// Update Count     : 62
+// Last Modified On : Fri Mar 12 18:35:38 2021
+// Update Count     : 63
 //
 
@@ -105,4 +105,5 @@
 		void postvisit( DirectiveStmt * );
 		void postvisit( AsmDecl * );					// special: statement in declaration context
+		void postvisit( DirectiveDecl * );				// special: statement in declaration context
 		void postvisit( IfStmt * );
 		void postvisit( SwitchStmt * );
Index: src/Common/CodeLocationTools.cpp
===================================================================
--- src/Common/CodeLocationTools.cpp	(revision 608339278c9d18f727c240a3f4fd3727746d28f3)
+++ src/Common/CodeLocationTools.cpp	(revision 2d019af1e5dc0df0ad2bbe9c215b4c34968890c0)
@@ -9,7 +9,7 @@
 // Author           : Andrew Beach
 // Created On       : Fri Dec  4 15:42:00 2020
-// Last Modified By : Andrew Beach
-// Last Modified On : Wed Dec  9  9:42:00 2020
-// Update Count     : 1
+// Last Modified By : Peter A. Buhr
+// Last Modified On : Fri Mar 12 18:35:37 2021
+// Update Count     : 2
 //
 
@@ -102,4 +102,5 @@
     macro(TypedefDecl, Decl) \
     macro(AsmDecl, AsmDecl) \
+    macro(DirectiveDecl, DirectiveDecl) \
     macro(StaticAssertDecl, StaticAssertDecl) \
     macro(CompoundStmt, CompoundStmt) \
Index: src/Common/PassVisitor.h
===================================================================
--- src/Common/PassVisitor.h	(revision 608339278c9d18f727c240a3f4fd3727746d28f3)
+++ src/Common/PassVisitor.h	(revision 2d019af1e5dc0df0ad2bbe9c215b4c34968890c0)
@@ -77,4 +77,6 @@
 	virtual void visit( AsmDecl * asmDecl ) override final;
 	virtual void visit( const AsmDecl * asmDecl ) override final;
+	virtual void visit( DirectiveDecl * directiveDecl ) override final;
+	virtual void visit( const DirectiveDecl * directiveDecl ) override final;
 	virtual void visit( StaticAssertDecl * assertDecl ) override final;
 	virtual void visit( const StaticAssertDecl * assertDecl ) override final;
@@ -261,4 +263,5 @@
 	virtual Declaration * mutate( TypedefDecl * typeDecl ) override final;
 	virtual AsmDecl * mutate( AsmDecl * asmDecl ) override final;
+	virtual DirectiveDecl * mutate( DirectiveDecl * directiveDecl ) override final;
 	virtual StaticAssertDecl * mutate( StaticAssertDecl * assertDecl ) override final;
 
Index: src/Common/PassVisitor.impl.h
===================================================================
--- src/Common/PassVisitor.impl.h	(revision 608339278c9d18f727c240a3f4fd3727746d28f3)
+++ src/Common/PassVisitor.impl.h	(revision 2d019af1e5dc0df0ad2bbe9c215b4c34968890c0)
@@ -973,4 +973,33 @@
 
 //--------------------------------------------------------------------------
+// DirectiveDecl
+template< typename pass_type >
+void PassVisitor< pass_type >::visit( DirectiveDecl * node ) {
+	VISIT_START( node );
+
+	maybeAccept_impl( node->stmt, *this );
+
+	VISIT_END( node );
+}
+
+template< typename pass_type >
+void PassVisitor< pass_type >::visit( const DirectiveDecl * node ) {
+	VISIT_START( node );
+
+	maybeAccept_impl( node->stmt, *this );
+
+	VISIT_END( node );
+}
+
+template< typename pass_type >
+DirectiveDecl * PassVisitor< pass_type >::mutate( DirectiveDecl * node ) {
+	MUTATE_START( node );
+
+	maybeMutate_impl( node->stmt, *this );
+
+	MUTATE_END( DirectiveDecl, node );
+}
+
+//--------------------------------------------------------------------------
 // StaticAssertDecl
 template< typename pass_type >
Index: src/Parser/DeclarationNode.cc
===================================================================
--- src/Parser/DeclarationNode.cc	(revision 608339278c9d18f727c240a3f4fd3727746d28f3)
+++ src/Parser/DeclarationNode.cc	(revision 2d019af1e5dc0df0ad2bbe9c215b4c34968890c0)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 12:34:05 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Jan 11 20:58:07 2021
-// Update Count     : 1137
+// Last Modified On : Fri Mar 12 18:35:37 2021
+// Update Count     : 1141
 //
 
@@ -424,4 +424,10 @@
 	newnode->attributes.push_back( new Attribute( *name, exprs ) );
 	delete name;
+	return newnode;
+}
+
+DeclarationNode * DeclarationNode::newDirectiveStmt( StatementNode * stmt ) {
+	DeclarationNode * newnode = new DeclarationNode;
+	newnode->directiveStmt = stmt;
 	return newnode;
 }
@@ -1072,4 +1078,7 @@
 		return new AsmDecl( strict_dynamic_cast<AsmStmt *>( asmStmt->build() ) );
 	} // if
+	if ( directiveStmt ) {
+		return new DirectiveDecl( strict_dynamic_cast<DirectiveStmt *>( directiveStmt->build() ) );
+	} // if
 
 	if ( variable.tyClass != TypeDecl::NUMBER_OF_KINDS ) {
Index: src/Parser/ParseNode.h
===================================================================
--- src/Parser/ParseNode.h	(revision 608339278c9d18f727c240a3f4fd3727746d28f3)
+++ src/Parser/ParseNode.h	(revision 2d019af1e5dc0df0ad2bbe9c215b4c34968890c0)
@@ -10,6 +10,6 @@
 // Created On       : Sat May 16 13:28:16 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Sun Jan  3 18:23:01 2021
-// Update Count     : 896
+// Last Modified On : Fri Mar 12 15:19:04 2021
+// Update Count     : 897
 //
 
@@ -249,4 +249,5 @@
 	static DeclarationNode * newTypeof( ExpressionNode * expr, bool basetypeof = false );
 	static DeclarationNode * newAttribute( const std::string *, ExpressionNode * expr = nullptr ); // gcc attributes
+	static DeclarationNode * newDirectiveStmt( StatementNode * stmt ); // gcc external directive statement
 	static DeclarationNode * newAsmStmt( StatementNode * stmt ); // gcc external asm statement
 	static DeclarationNode * newStaticAssert( ExpressionNode * condition, Expression * message );
@@ -345,4 +346,5 @@
 	std::string error;
 	StatementNode * asmStmt = nullptr;
+	StatementNode * directiveStmt = nullptr;
 
 	static UniqueName anonymous;
Index: src/Parser/parser.yy
===================================================================
--- src/Parser/parser.yy	(revision 608339278c9d18f727c240a3f4fd3727746d28f3)
+++ src/Parser/parser.yy	(revision 2d019af1e5dc0df0ad2bbe9c215b4c34968890c0)
@@ -10,6 +10,6 @@
 // Created On       : Sat Sep  1 20:22:55 2001
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Feb 17 09:03:07 2021
-// Update Count     : 4722
+// Last Modified On : Fri Mar 12 15:21:02 2021
+// Update Count     : 4728
 //
 
@@ -2639,5 +2639,7 @@
 
 external_definition:
-	declaration
+	DIRECTIVE
+		{ $$ = DeclarationNode::newDirectiveStmt( new StatementNode( build_directive( $1 ) ) ); }
+	| declaration
 	| external_function_definition
 	| EXTENSION external_definition						// GCC, multiple __extension__ allowed, meaning unknown
Index: src/SynTree/Declaration.cc
===================================================================
--- src/SynTree/Declaration.cc	(revision 608339278c9d18f727c240a3f4fd3727746d28f3)
+++ src/SynTree/Declaration.cc	(revision 2d019af1e5dc0df0ad2bbe9c215b4c34968890c0)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Wed Dec 11 16:39:56 2019
-// Update Count     : 36
+// Last Modified On : Fri Mar 12 18:35:39 2021
+// Update Count     : 37
 //
 
@@ -66,4 +66,23 @@
 
 
+DirectiveDecl::DirectiveDecl( DirectiveStmt *stmt ) : Declaration( "", Type::StorageClasses(), LinkageSpec::C ), stmt( stmt ) {
+}
+
+DirectiveDecl::DirectiveDecl( const DirectiveDecl &other ) : Declaration( other ), stmt( maybeClone( other.stmt ) ) {
+}
+
+DirectiveDecl::~DirectiveDecl() {
+	delete stmt;
+}
+
+void DirectiveDecl::print( std::ostream &os, Indenter indent ) const {
+	stmt->print( os, indent );
+}
+
+void DirectiveDecl::printShort( std::ostream &os, Indenter indent ) const {
+	stmt->print( os, indent );
+}
+
+
 StaticAssertDecl::StaticAssertDecl( Expression * condition, ConstantExpr * message ) : Declaration( "", Type::StorageClasses(), LinkageSpec::C ), condition( condition ), message( message )  {
 }
Index: src/SynTree/Declaration.h
===================================================================
--- src/SynTree/Declaration.h	(revision 608339278c9d18f727c240a3f4fd3727746d28f3)
+++ src/SynTree/Declaration.h	(revision 2d019af1e5dc0df0ad2bbe9c215b4c34968890c0)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Mon Jan 11 20:48:39 2021
-// Update Count     : 158
+// Last Modified On : Fri Mar 12 18:35:36 2021
+// Update Count     : 159
 //
 
@@ -400,4 +400,23 @@
 };
 
+class DirectiveDecl : public Declaration {
+  public:
+	DirectiveStmt * stmt;
+
+	DirectiveDecl( DirectiveStmt * stmt );
+	DirectiveDecl( const DirectiveDecl & other );
+	virtual ~DirectiveDecl();
+
+	DirectiveStmt * get_stmt() { return stmt; }
+	void set_stmt( DirectiveStmt * newValue ) { stmt = newValue; }
+
+	virtual DirectiveDecl * clone() const override { return new DirectiveDecl( *this ); }
+	virtual void accept( Visitor & v ) override { v.visit( this ); }
+	virtual void accept( Visitor & v ) const override { v.visit( this ); }
+	virtual DirectiveDecl * acceptMutator( Mutator & m )  override { return m.mutate( this ); }
+	virtual void print( std::ostream & os, Indenter indent = {} ) const override;
+	virtual void printShort( std::ostream & os, Indenter indent = {} ) const override;
+};
+
 class StaticAssertDecl : public Declaration {
 public:
Index: src/SynTree/Mutator.h
===================================================================
--- src/SynTree/Mutator.h	(revision 608339278c9d18f727c240a3f4fd3727746d28f3)
+++ src/SynTree/Mutator.h	(revision 2d019af1e5dc0df0ad2bbe9c215b4c34968890c0)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Jul 25 22:37:46 2019
-// Update Count     : 17
+// Last Modified On : Fri Mar 12 18:35:36 2021
+// Update Count     : 18
 //
 #pragma once
@@ -34,4 +34,5 @@
 	virtual Declaration * mutate( TypedefDecl * typeDecl ) = 0;
 	virtual AsmDecl * mutate( AsmDecl * asmDecl ) = 0;
+	virtual DirectiveDecl * mutate( DirectiveDecl * directiveDecl ) = 0;
 	virtual StaticAssertDecl * mutate( StaticAssertDecl * assertDecl ) = 0;
 
Index: src/SynTree/SynTree.h
===================================================================
--- src/SynTree/SynTree.h	(revision 608339278c9d18f727c240a3f4fd3727746d28f3)
+++ src/SynTree/SynTree.h	(revision 2d019af1e5dc0df0ad2bbe9c215b4c34968890c0)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Jul 25 22:37:45 2019
-// Update Count     : 12
+// Last Modified On : Fri Mar 12 18:56:44 2021
+// Update Count     : 13
 //
 
@@ -36,4 +36,5 @@
 class TypedefDecl;
 class AsmDecl;
+class DirectiveDecl;
 class StaticAssertDecl;
 
Index: src/SynTree/Visitor.h
===================================================================
--- src/SynTree/Visitor.h	(revision 608339278c9d18f727c240a3f4fd3727746d28f3)
+++ src/SynTree/Visitor.h	(revision 2d019af1e5dc0df0ad2bbe9c215b4c34968890c0)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Peter A. Buhr
-// Last Modified On : Thu Jul 25 22:21:49 2019
-// Update Count     : 14
+// Last Modified On : Fri Mar 12 18:35:35 2021
+// Update Count     : 15
 //
 
@@ -45,4 +45,6 @@
 	virtual void visit( AsmDecl * node ) { visit( const_cast<const AsmDecl *>(node) ); }
 	virtual void visit( const AsmDecl * asmDecl ) = 0;
+	virtual void visit( DirectiveDecl * node ) { visit( const_cast<const DirectiveDecl *>(node) ); }
+	virtual void visit( const DirectiveDecl * directiveDecl ) = 0;
 	virtual void visit( StaticAssertDecl * node ) { visit( const_cast<const StaticAssertDecl *>(node) ); }
 	virtual void visit( const StaticAssertDecl * assertDecl ) = 0;
