Index: src/Makefile.in
===================================================================
--- src/Makefile.in	(revision 107b01a853d2fa7848b6015136777f62881c1779)
+++ src/Makefile.in	(revision 4fd45bc68a860b66735e58a7cc9d93a896457835)
@@ -206,6 +206,9 @@
 	ResolvExpr/PtrsAssignable.$(OBJEXT) \
 	ResolvExpr/PtrsCastable.$(OBJEXT) \
-	ResolvExpr/RenameVars.$(OBJEXT) ResolvExpr/Resolver.$(OBJEXT) \
+	ResolvExpr/RenameVars.$(OBJEXT) \
+	ResolvExpr/ResolveAssertions.$(OBJEXT) \
+	ResolvExpr/Resolver.$(OBJEXT) \
 	ResolvExpr/ResolveTypeof.$(OBJEXT) \
+	ResolvExpr/SpecCost.$(OBJEXT) \
 	ResolvExpr/TypeEnvironment.$(OBJEXT) \
 	ResolvExpr/Unify.$(OBJEXT) SymTab/Autogen.$(OBJEXT) \
@@ -262,11 +265,14 @@
 	ResolvExpr/TypeEnvironment.$(OBJEXT) \
 	ResolvExpr/CurrentObject.$(OBJEXT) \
-	ResolvExpr/ExplodedActual.$(OBJEXT) SymTab/Indexer.$(OBJEXT) \
-	SymTab/Mangler.$(OBJEXT) SymTab/ManglerCommon.$(OBJEXT) \
-	SymTab/Validate.$(OBJEXT) SymTab/FixFunction.$(OBJEXT) \
-	SymTab/Autogen.$(OBJEXT) SynTree/Type.$(OBJEXT) \
-	SynTree/VoidType.$(OBJEXT) SynTree/BasicType.$(OBJEXT) \
-	SynTree/PointerType.$(OBJEXT) SynTree/ArrayType.$(OBJEXT) \
-	SynTree/ReferenceType.$(OBJEXT) SynTree/FunctionType.$(OBJEXT) \
+	ResolvExpr/ExplodedActual.$(OBJEXT) \
+	ResolvExpr/SpecCost.$(OBJEXT) \
+	ResolvExpr/ResolveAssertions.$(OBJEXT) \
+	SymTab/Indexer.$(OBJEXT) SymTab/Mangler.$(OBJEXT) \
+	SymTab/ManglerCommon.$(OBJEXT) SymTab/Validate.$(OBJEXT) \
+	SymTab/FixFunction.$(OBJEXT) SymTab/Autogen.$(OBJEXT) \
+	SynTree/Type.$(OBJEXT) SynTree/VoidType.$(OBJEXT) \
+	SynTree/BasicType.$(OBJEXT) SynTree/PointerType.$(OBJEXT) \
+	SynTree/ArrayType.$(OBJEXT) SynTree/ReferenceType.$(OBJEXT) \
+	SynTree/FunctionType.$(OBJEXT) \
 	SynTree/ReferenceToType.$(OBJEXT) SynTree/TupleType.$(OBJEXT) \
 	SynTree/TypeofType.$(OBJEXT) SynTree/AttrType.$(OBJEXT) \
@@ -589,4 +595,5 @@
 	ResolvExpr/Occurs.cc ResolvExpr/TypeEnvironment.cc \
 	ResolvExpr/CurrentObject.cc ResolvExpr/ExplodedActual.cc \
+	ResolvExpr/SpecCost.cc ResolvExpr/ResolveAssertions.cc \
 	SymTab/Indexer.cc SymTab/Mangler.cc SymTab/ManglerCommon.cc \
 	SymTab/Validate.cc SymTab/FixFunction.cc SymTab/Autogen.cc \
@@ -611,9 +618,8 @@
 	Virtual/ExpandCasts.cc
 MAINTAINERCLEANFILES = ${libdir}/${notdir ${cfa_cpplib_PROGRAMS}}
-MOSTLYCLEANFILES = Parser/parser.hh Parser/parser.output
+MOSTLYCLEANFILES = Parser/gcc-flags.h Parser/lex.cc Parser/parser.cc \
+	Parser/parser.hh Parser/parser.output
 BUILT_SOURCES = Parser/parser.hh
 AM_YFLAGS = -d -t -v
-
-# Is there a way to use a variable for the directory names?
 
 # put into lib for now
@@ -628,85 +634,87 @@
 noinst_LIBRARIES = libdemangle.a
 libdemangle_a_SOURCES = SymTab/Demangle.cc SymTab/ManglerCommon.cc \
-  SynTree/Type.cc \
-  SynTree/VoidType.cc \
-  SynTree/BasicType.cc \
-  SynTree/PointerType.cc \
-  SynTree/ArrayType.cc \
-  SynTree/ReferenceType.cc \
-  SynTree/FunctionType.cc \
-  SynTree/ReferenceToType.cc \
-  SynTree/TupleType.cc \
-  SynTree/TypeofType.cc \
-  SynTree/AttrType.cc \
-  SynTree/VarArgsType.cc \
-  SynTree/ZeroOneType.cc \
-  SynTree/Constant.cc \
-  SynTree/Expression.cc \
-  SynTree/TupleExpr.cc \
-  SynTree/CommaExpr.cc \
-  SynTree/TypeExpr.cc \
-  SynTree/ApplicationExpr.cc \
-  SynTree/AddressExpr.cc \
-  SynTree/Statement.cc \
-  SynTree/CompoundStmt.cc \
-  SynTree/DeclStmt.cc \
-  SynTree/Declaration.cc \
-  SynTree/DeclarationWithType.cc \
-  SynTree/ObjectDecl.cc \
-  SynTree/FunctionDecl.cc \
-  SynTree/AggregateDecl.cc \
-  SynTree/NamedTypeDecl.cc \
-  SynTree/TypeDecl.cc \
-  SynTree/Initializer.cc \
-  SynTree/TypeSubstitution.cc \
-  SynTree/Attribute.cc \
-  SynTree/DeclReplacer.cc \
-  CompilationState.cc \
-  CodeGen/CodeGenerator.cc \
-  CodeGen/FixMain.cc \
-  CodeGen/GenType.cc \
-  CodeGen/OperatorTable.cc \
-  Common/Assert.cc \
-  Common/Eval.cc \
-  Common/SemanticError.cc \
-  Common/UniqueName.cc \
-  Concurrency/Keywords.cc \
-  ControlStruct/ForExprMutator.cc \
-  ControlStruct/LabelFixer.cc \
-  ControlStruct/LabelGenerator.cc \
-  ControlStruct/MLEMutator.cc \
-  ControlStruct/Mutate.cc \
-  GenPoly/GenPoly.cc \
-  GenPoly/Lvalue.cc \
-  InitTweak/GenInit.cc \
-  InitTweak/InitTweak.cc \
-  Parser/LinkageSpec.cc \
-  ResolvExpr/AdjustExprType.cc \
-  ResolvExpr/Alternative.cc \
-  ResolvExpr/AlternativeFinder.cc \
-  ResolvExpr/ExplodedActual.cc \
-  ResolvExpr/CastCost.cc \
-  ResolvExpr/CommonType.cc \
-  ResolvExpr/ConversionCost.cc \
-  ResolvExpr/CurrentObject.cc \
-  ResolvExpr/FindOpenVars.cc \
-  ResolvExpr/Occurs.cc \
-  ResolvExpr/PolyCost.cc \
-  ResolvExpr/PtrsAssignable.cc \
-  ResolvExpr/PtrsCastable.cc \
-  ResolvExpr/RenameVars.cc \
-  ResolvExpr/Resolver.cc \
-  ResolvExpr/ResolveTypeof.cc \
-  ResolvExpr/TypeEnvironment.cc \
-  ResolvExpr/Unify.cc \
-  SymTab/Autogen.cc \
-  SymTab/FixFunction.cc \
-  SymTab/Indexer.cc \
-  SymTab/Mangler.cc \
-  SymTab/Validate.cc \
-  Tuples/Explode.cc \
-  Tuples/TupleAssignment.cc \
-  Tuples/TupleExpansion.cc \
-  Validate/HandleAttributes.cc
+	SynTree/Type.cc \
+	SynTree/VoidType.cc \
+	SynTree/BasicType.cc \
+	SynTree/PointerType.cc \
+	SynTree/ArrayType.cc \
+	SynTree/ReferenceType.cc \
+	SynTree/FunctionType.cc \
+	SynTree/ReferenceToType.cc \
+	SynTree/TupleType.cc \
+	SynTree/TypeofType.cc \
+	SynTree/AttrType.cc \
+	SynTree/VarArgsType.cc \
+	SynTree/ZeroOneType.cc \
+	SynTree/Constant.cc \
+	SynTree/Expression.cc \
+	SynTree/TupleExpr.cc \
+	SynTree/CommaExpr.cc \
+	SynTree/TypeExpr.cc \
+	SynTree/ApplicationExpr.cc \
+	SynTree/AddressExpr.cc \
+	SynTree/Statement.cc \
+	SynTree/CompoundStmt.cc \
+	SynTree/DeclStmt.cc \
+	SynTree/Declaration.cc \
+	SynTree/DeclarationWithType.cc \
+	SynTree/ObjectDecl.cc \
+	SynTree/FunctionDecl.cc \
+	SynTree/AggregateDecl.cc \
+	SynTree/NamedTypeDecl.cc \
+	SynTree/TypeDecl.cc \
+	SynTree/Initializer.cc \
+	SynTree/TypeSubstitution.cc \
+	SynTree/Attribute.cc \
+	SynTree/DeclReplacer.cc \
+	CompilationState.cc \
+	CodeGen/CodeGenerator.cc \
+	CodeGen/FixMain.cc \
+	CodeGen/GenType.cc \
+	CodeGen/OperatorTable.cc \
+	Common/Assert.cc \
+	Common/Eval.cc \
+	Common/SemanticError.cc \
+	Common/UniqueName.cc \
+	Concurrency/Keywords.cc \
+	ControlStruct/ForExprMutator.cc \
+	ControlStruct/LabelFixer.cc \
+	ControlStruct/LabelGenerator.cc \
+	ControlStruct/MLEMutator.cc \
+	ControlStruct/Mutate.cc \
+	GenPoly/GenPoly.cc \
+	GenPoly/Lvalue.cc \
+	InitTweak/GenInit.cc \
+	InitTweak/InitTweak.cc \
+	Parser/LinkageSpec.cc \
+	ResolvExpr/AdjustExprType.cc \
+	ResolvExpr/Alternative.cc \
+	ResolvExpr/AlternativeFinder.cc \
+	ResolvExpr/ExplodedActual.cc \
+	ResolvExpr/CastCost.cc \
+	ResolvExpr/CommonType.cc \
+	ResolvExpr/ConversionCost.cc \
+	ResolvExpr/CurrentObject.cc \
+	ResolvExpr/FindOpenVars.cc \
+	ResolvExpr/Occurs.cc \
+	ResolvExpr/PolyCost.cc \
+	ResolvExpr/PtrsAssignable.cc \
+	ResolvExpr/PtrsCastable.cc \
+	ResolvExpr/RenameVars.cc \
+	ResolvExpr/ResolveAssertions.cc \
+	ResolvExpr/Resolver.cc \
+	ResolvExpr/ResolveTypeof.cc \
+	ResolvExpr/SpecCost.cc \
+	ResolvExpr/TypeEnvironment.cc \
+	ResolvExpr/Unify.cc \
+	SymTab/Autogen.cc \
+	SymTab/FixFunction.cc \
+	SymTab/Indexer.cc \
+	SymTab/Mangler.cc \
+	SymTab/Validate.cc \
+	Tuples/Explode.cc \
+	Tuples/TupleAssignment.cc \
+	Tuples/TupleExpansion.cc \
+	Validate/HandleAttributes.cc
 
 all: $(BUILT_SOURCES)
@@ -946,7 +954,11 @@
 ResolvExpr/RenameVars.$(OBJEXT): ResolvExpr/$(am__dirstamp) \
 	ResolvExpr/$(DEPDIR)/$(am__dirstamp)
+ResolvExpr/ResolveAssertions.$(OBJEXT): ResolvExpr/$(am__dirstamp) \
+	ResolvExpr/$(DEPDIR)/$(am__dirstamp)
 ResolvExpr/Resolver.$(OBJEXT): ResolvExpr/$(am__dirstamp) \
 	ResolvExpr/$(DEPDIR)/$(am__dirstamp)
 ResolvExpr/ResolveTypeof.$(OBJEXT): ResolvExpr/$(am__dirstamp) \
+	ResolvExpr/$(DEPDIR)/$(am__dirstamp)
+ResolvExpr/SpecCost.$(OBJEXT): ResolvExpr/$(am__dirstamp) \
 	ResolvExpr/$(DEPDIR)/$(am__dirstamp)
 ResolvExpr/TypeEnvironment.$(OBJEXT): ResolvExpr/$(am__dirstamp) \
@@ -1207,6 +1219,8 @@
 @AMDEP_TRUE@@am__include@ @am__quote@ResolvExpr/$(DEPDIR)/PtrsCastable.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ResolvExpr/$(DEPDIR)/RenameVars.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@ResolvExpr/$(DEPDIR)/ResolveAssertions.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ResolvExpr/$(DEPDIR)/ResolveTypeof.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ResolvExpr/$(DEPDIR)/Resolver.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@ResolvExpr/$(DEPDIR)/SpecCost.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ResolvExpr/$(DEPDIR)/TypeEnvironment.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@ResolvExpr/$(DEPDIR)/Unify.Po@am__quote@
@@ -1544,4 +1558,9 @@
 
 
+Parser/gcc-flags.h :
+	${AM_V_GEN}$(CC) -dM -E - < /dev/null | sed 's/define /define __GCC__/' > $(@)
+
+Parser/lex.ll : Parser/gcc-flags.h
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
