Index: trunk/ab5.0/abdev/compiler_x86/Compile_ProcOp.cpp
===================================================================
--- trunk/ab5.0/abdev/compiler_x86/Compile_ProcOp.cpp	(revision 677)
+++ trunk/ab5.0/abdev/compiler_x86/Compile_ProcOp.cpp	(revision 684)
@@ -433,9 +433,7 @@
 	compiler.codeGenerator.gotoLabelSchedules.clear();
 
-	//With情報のメモリを確保
-	extern WITHINFO WithInfo;
-	WithInfo.ppName=(char **)HeapAlloc(hHeap,0,1);
-	WithInfo.pWithCp=(int *)HeapAlloc(hHeap,0,1);
-	WithInfo.num=0;
+	//With情報を初期化
+	extern WithInfos withInfos;
+	withInfos.clear();
 
 	// 重複エラー情報をクリア
@@ -590,12 +588,4 @@
 	}
 
-	//With情報のメモリを解放
-	for(i3=0;i3<WithInfo.num;i3++){
-		compiler.errorMessenger.Output(22,"With",WithInfo.pWithCp[i3]);
-		HeapDefaultFree(WithInfo.ppName[i3]);
-	}
-	HeapDefaultFree(WithInfo.ppName);
-	HeapDefaultFree(WithInfo.pWithCp);
-
 	//push ebp
 	AllLocalVarSize+=sizeof(long);
Index: trunk/ab5.0/abdev/compiler_x86/MakePeHdr.cpp
===================================================================
--- trunk/ab5.0/abdev/compiler_x86/MakePeHdr.cpp	(revision 677)
+++ trunk/ab5.0/abdev/compiler_x86/MakePeHdr.cpp	(revision 684)
@@ -370,4 +370,10 @@
 	//compiler.codeGenerator.lexicalScopes.Init( compiler.codeGenerator.GetNativeCodeSize() );
 
+	// 名前空間が初期化されているかをチェック
+	if( compiler.GetNamespaceSupporter().GetLivingNamespaceScopes().size() )
+	{
+		compiler.errorMessenger.OutputFatalError();
+	}
+
 
 	/////////////////////////////////////////////////////////////////
@@ -394,10 +400,6 @@
 	compiler.StartGlobalAreaCompile();
 
-	if( !compiler.IsDll() ){
-		// 名前空間が初期化されているかをチェック
-		if( compiler.GetNamespaceSupporter().GetLivingNamespaceScopes().size() ){
-			compiler.errorMessenger.OutputFatalError();
-		}
-
+	if( !compiler.IsDll() )
+	{
 		//ラベル管理オブジェクトを初期化
 		compiler.codeGenerator.gotoLabels.clear();
@@ -406,9 +408,7 @@
 		compiler.codeGenerator.gotoLabelSchedules.clear();
 
-		//With情報のメモリを確保
-		extern WITHINFO WithInfo;
-		WithInfo.ppName=(char **)HeapAlloc(hHeap,0,1);
-		WithInfo.pWithCp=(int *)HeapAlloc(hHeap,0,1);
-		WithInfo.num=0;
+		//With情報を初期化
+		extern WithInfos withInfos;
+		withInfos.clear();
 
 		//Continueアドレスを初期化
@@ -419,9 +419,4 @@
 
 		trace_for_sourcecodestep( "★★★ グローバル領域のコンパイルを開始" );
-
-
-		//未完成
-		//breakpoint;
-
 
 		if( compiler.IsCore() )
@@ -472,12 +467,4 @@
 		extern int GlobalOpBufferSize;
 		GlobalOpBufferSize = compiler.linker.GetNativeCode().GetSize();
-
-		//With情報のメモリを解放
-		for(i=0;i<WithInfo.num;i++){
-			compiler.errorMessenger.Output(22,"With",WithInfo.pWithCp[i]);
-			HeapDefaultFree(WithInfo.ppName[i]);
-		}
-		HeapDefaultFree(WithInfo.ppName);
-		HeapDefaultFree(WithInfo.pWithCp);
 
 		// 名前空間が正しく閉じられているかをチェック
Index: trunk/ab5.0/abdev/compiler_x86/Opcode.h
===================================================================
--- trunk/ab5.0/abdev/compiler_x86/Opcode.h	(revision 677)
+++ trunk/ab5.0/abdev/compiler_x86/Opcode.h	(revision 684)
@@ -28,9 +28,16 @@
 
 //With情報
-struct WITHINFO{
-	char **ppName;
-	int *pWithCp;
-	int num;
+struct WithInfo
+{
+	std::string name;
+	int sourceCodePos;
+
+	WithInfo( const std::string &name, int sourceCodePos )
+		: name( name )
+		, sourceCodePos( sourceCodePos )
+	{
+	}
 };
+typedef std::vector<WithInfo> WithInfos;
 
 
