Add a test to ensure that PPH files are #included at global scope.
Initially, this test is XFAIL, as it's a low priority error.

Index: gcc/testsuite/ChangeLog.pph

2011-04-12  Lawrence Crowl  <cr...@google.com>

        * g++.dg/pph/y2smother.cc: New.


Index: gcc/testsuite/g++.dg/pph/y2smother.cc
===================================================================
*** gcc/testsuite/g++.dg/pph/y2smother.cc       (revision 0)
--- gcc/testsuite/g++.dg/pph/y2smother.cc       (revision 0)
***************
*** 0 ****
--- 1,4 ----
+ namespace smother {
+ #include "x1struct1.h"
+ // { dg-error "pph file not included at global scope" "" { xfail *-*-* } }
+ }

--
This patch is available for review at http://codereview.appspot.com/4399041

Reply via email to