diff mbox

[pph] Fix test failure in my last patch (issue5476051)

Message ID 20111209192911.A38C6AE0C1@tobiano.tor.corp.google.com
State New
Headers show

Commit Message

Diego Novillo Dec. 9, 2011, 7:29 p.m. UTC
Bah, I ran make check in a different build directory.  This fixes the
two failures I introduced with my warning patch.

Now tested on the proper build dir.


Diego.


cp/ChangeLog.pph

	* pph-core.c (pph_include_handler): Use LOC instead of
	INPUT_LOCATION.

testsuite/ChangeLog.pph

	* g++.dg/pph/d1symnotinc.cc: Expect warning.
	* g++.dg/pph/y8inc-nmspc.cc: Likewise.



--
This patch is available for review at http://codereview.appspot.com/5476051
diff mbox

Patch

diff --git a/gcc/cp/pph-core.c b/gcc/cp/pph-core.c
index 33ed64b..a834f79 100644
--- a/gcc/cp/pph-core.c
+++ b/gcc/cp/pph-core.c
@@ -640,7 +640,7 @@  pph_include_handler (cpp_reader *reader,
 	  read_text_file_p = false;
 	}
       else
-	warning_at (input_location, OPT_Wmissing_pph,
+	warning_at (loc, OPT_Wmissing_pph,
 		    "cannot open PPH file %s for reading: %m\n"
 		    "using original header %s", pph_file, name);
     }
diff --git a/gcc/testsuite/g++.dg/pph/d1symnotinc.cc b/gcc/testsuite/g++.dg/pph/d1symnotinc.cc
index dbdc2c0..a861e5f 100644
--- a/gcc/testsuite/g++.dg/pph/d1symnotinc.cc
+++ b/gcc/testsuite/g++.dg/pph/d1symnotinc.cc
@@ -1,4 +1,4 @@ 
-// { dg-message ".*fatal error: cannot open PPH file.*" }
+// { dg-options "-Wmissing-pph"
 #define NAME v
 #define VALUE 1
-#include "d0symnotinc.h"
+#include "d0symnotinc.h" // { dg-warning "cannot open PPH file .*" }
diff --git a/gcc/testsuite/g++.dg/pph/y8inc-nmspc.cc b/gcc/testsuite/g++.dg/pph/y8inc-nmspc.cc
index 70b209a..be0520d 100644
--- a/gcc/testsuite/g++.dg/pph/y8inc-nmspc.cc
+++ b/gcc/testsuite/g++.dg/pph/y8inc-nmspc.cc
@@ -1,3 +1,4 @@ 
+// { dg-options "-Winvalid-pph" }
 namespace smother {
-#include "x1struct1.h" // { dg-error "PPH file .* not included at global scope" "" }
+#include "x1struct1.h" // { dg-warning "PPH file .* not included at global scope" "" }
 }