Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2)

Issue 5476051: [pph] Fix test failure in my last patch (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 4 months ago by Diego Novillo
Modified:
13 years, 1 month ago
Reviewers:
CC:
Lawrence Crowl, gcc-patches_gcc.gnu.org
Visibility:
Public.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -4 lines) Patch
M gcc/cp/pph-core.c View 1 chunk +1 line, -1 line 0 comments Download
M gcc/testsuite/g++.dg/pph/d1symnotinc.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M gcc/testsuite/g++.dg/pph/y8inc-nmspc.cc View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 1
Diego Novillo
13 years, 4 months ago (2011-12-09 19:29:15 UTC) #1
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.


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" "" }
 }

--
This patch is available for review at http://codereview.appspot.com/5476051
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b