From a5c3cccda43ddeaa0e90df75f74c230dea0ad579 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Mon, 30 Oct 2000 22:29:00 +0000 Subject: cppfiles.c (stack_include_file): Check for stacked contexts here. * cppfiles.c (stack_include_file): Check for stacked contexts here. * cpphash.h (_cpp_do__Pragma): New prototype. * cppinit.c (cpp_reader_init): Add _Pragma keyword to hash table. * cpplex.c (skip_escaped_newlines): Only process trigraphs and escaped newlines if !(buffer->from_stage3). (_cpp_lex_token): Warn about missing newlines iff !buffer->from_stage3. * cpplib.c (get__Pragma_string, destringize, _cpp_do__Pragma): New functions. (run_directive): Set output_line for _Pragma to avoid line markers in output. Set from_stage3 and prevent macro expansion for _Pragma and command-line options. Check buffer exhaustion. (cpp_push_buffer): Don't check for stacked macro contexts, as this is perfectly legitimate for _Pragma. Move the check to stack_include_file instead. Set from_stage3 iff buffer is preprocessed input. * cpplib.h (struct cpp_buffer): Make warned_cplusplus_comments unsigned. New boolean from_stage3. (struct spec_nodes): Add n__Pragma. * cppmacro.c (enter_macro_context): Flip sense of return value. (_cpp_get_token): Handle _Pragma operator. From-SVN: r37147 --- gcc/cppinit.c | 1 + 1 file changed, 1 insertion(+) (limited to 'gcc/cppinit.c') diff --git a/gcc/cppinit.c b/gcc/cppinit.c index 20dfc63..512a0ff 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -487,6 +487,7 @@ cpp_reader_init (pfile) s = &pfile->spec_nodes; s->n_L = cpp_lookup (pfile, DSC("L")); s->n_defined = cpp_lookup (pfile, DSC("defined")); + s->n__Pragma = cpp_lookup (pfile, DSC("_Pragma")); s->n__STRICT_ANSI__ = cpp_lookup (pfile, DSC("__STRICT_ANSI__")); s->n__CHAR_UNSIGNED__ = cpp_lookup (pfile, DSC("__CHAR_UNSIGNED__")); s->n__VA_ARGS__ = cpp_lookup (pfile, DSC("__VA_ARGS__")); -- cgit v1.1