aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpphash.c
diff options
context:
space:
mode:
authorZack Weinberg <zack@wolery.cumb.org>2000-02-02 21:41:35 +0000
committerZack Weinberg <zack@gcc.gnu.org>2000-02-02 21:41:35 +0000
commit5237f531dafcdf5a118ec501b0bbea1ee4e0928c (patch)
tree85f4994520bd25edda71f41ae96e75498894cb12 /gcc/cpphash.c
parent3e7cd49fee867f8af4815815ded1dd621d27ceab (diff)
downloadgcc-5237f531dafcdf5a118ec501b0bbea1ee4e0928c.zip
gcc-5237f531dafcdf5a118ec501b0bbea1ee4e0928c.tar.gz
gcc-5237f531dafcdf5a118ec501b0bbea1ee4e0928c.tar.bz2
cpplib.h (cpp_reader): Add new flag, no_directives.
* cpplib.h (cpp_reader): Add new flag, no_directives. * cpphash.c (macarg): Set it. * cpplib.c (handle_directive): If no_directives is on and we find a directive, issue an error and discard the line. From-SVN: r31763
Diffstat (limited to 'gcc/cpphash.c')
-rw-r--r--gcc/cpphash.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cpphash.c b/gcc/cpphash.c
index 8a0c887..a7f19f1 100644
--- a/gcc/cpphash.c
+++ b/gcc/cpphash.c
@@ -783,6 +783,7 @@ macarg (pfile, rest_args)
/* Try to parse as much of the argument as exists at this
input stack level. */
pfile->no_macro_expand++;
+ pfile->no_directives++;
CPP_OPTIONS (pfile)->no_line_commands++;
for (;;)
{
@@ -823,6 +824,7 @@ done:
CPP_OPTIONS (pfile)->put_out_comments = save_put_out_comments;
CPP_OPTIONS (pfile)->no_line_commands--;
pfile->no_macro_expand--;
+ pfile->no_directives--;
return token;
}