aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpphash.c
diff options
context:
space:
mode:
authorGeoff Keating <geoffk@cygnus.com>1999-09-09 04:00:37 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>1999-09-09 04:00:37 +0000
commitfc009f966c98317401b51127f59de4ad37bb7d19 (patch)
treeadfb849ae0813b5bacab43fb7a7ab5ec23bc7fb6 /gcc/cpphash.c
parentd60f72aec57414b8339eecb25c33b423af7e6946 (diff)
downloadgcc-fc009f966c98317401b51127f59de4ad37bb7d19.zip
gcc-fc009f966c98317401b51127f59de4ad37bb7d19.tar.gz
gcc-fc009f966c98317401b51127f59de4ad37bb7d19.tar.bz2
Makefile.in (cppexp.o): Depend on cpphash.h.
* Makefile.in (cppexp.o): Depend on cpphash.h. * cppexp.c (cpp_lex): Handle `defined (xxx)' for poisoned xxx. Include cpphash.h. * cpphash.c (special_symbol): Handle plain `xxx' for poisoned xxx. * cpplib.c (do_define): Generalise to handle poisoned definitions, redefining poisoned identifiers, etc. (do_undef): Don't allow poisoned identifiers to be undefined. (do_pragma): Add #pragma poison. (do_xifdef): Handle `#ifdef xxx' for poisoned xxx. * cccp.c: Add T_POISON node type. (special_symbol): Handle `defined(xxx)' and plain `xxx' for poisoned xxx. (do_define): Generalise to handle poisoned definitions, redefining poisoned identifiers, etc. (do_undef): Don't allow poisoned identifiers to be undefined. (do_pragma): Add #pragma poison. (do_xifdef): Handle `#ifdef xxx' for poisoned xxx. * c-pragma.c (handle_pragma_token): Ignore #pragma poison. * c-pragma.h: Add ps_poison state. We now always have generic pragmas. From-SVN: r29224
Diffstat (limited to 'gcc/cpphash.c')
-rw-r--r--gcc/cpphash.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cpphash.c b/gcc/cpphash.c
index c75cad1..c7da2b3 100644
--- a/gcc/cpphash.c
+++ b/gcc/cpphash.c
@@ -1020,6 +1020,13 @@ special_symbol (hp, pfile)
return;
}
+ case T_POISON:
+ cpp_error (pfile, "attempt to use poisoned `%s'.", hp->name);
+ CPP_RESERVE (pfile, 1);
+ CPP_PUTC_Q (pfile, '0');
+ CPP_NUL_TERMINATE_Q (pfile);
+ break;
+
default:
cpp_fatal (pfile, "cpplib internal error: invalid special hash type");
return;