summaryrefslogtreecommitdiffstats
path: root/gcc/cpplib.c
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2002-08-14 20:17:55 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2002-08-14 20:17:55 +0000
commit47f175274591a9f5f384e25a56d4f994e36b368f (patch)
tree8bda098fc62ead108660a24e4d81f6fd4ff0376b /gcc/cpplib.c
parent44b0ffc3f6652b62823cc97047e44ca83cbc6651 (diff)
downloadppe42-gcc-47f175274591a9f5f384e25a56d4f994e36b368f.tar.gz
ppe42-gcc-47f175274591a9f5f384e25a56d4f994e36b368f.zip
PR preprocessor/7526
* cpplib.c (run_directive): Kludge so _Pragma dependency works. testsuite: * gcc.dg/cpp/_Pragma3.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56332 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cpplib.c')
-rw-r--r--gcc/cpplib.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/cpplib.c b/gcc/cpplib.c
index 935a0e0b882..0e9c4a1263f 100644
--- a/gcc/cpplib.c
+++ b/gcc/cpplib.c
@@ -459,6 +459,9 @@ run_directive (pfile, dir_no, buf, count)
{
cpp_push_buffer (pfile, (const uchar *) buf, count,
/* from_stage3 */ true, 1);
+ /* Disgusting hack. */
+ if (dir_no == T_PRAGMA)
+ pfile->buffer->inc = pfile->buffer->prev->inc;
start_directive (pfile);
/* We don't want a leading # to be interpreted as a directive. */
pfile->buffer->saved_flags = 0;
@@ -467,6 +470,8 @@ run_directive (pfile, dir_no, buf, count)
prepare_directive_trad (pfile);
(void) (*pfile->directive->handler) (pfile);
end_directive (pfile, 1);
+ if (dir_no == T_PRAGMA)
+ pfile->buffer->inc = NULL;
_cpp_pop_buffer (pfile);
}
OpenPOWER on IntegriCloud