From 07aa0b04f2ef60131900c2ea350d0d78e028acad Mon Sep 17 00:00:00 2001 From: Zack Weinberg Date: Sat, 1 Apr 2000 22:55:25 +0000 Subject: cpplib.c: Include symcat.h. * cpplib.c: Include symcat.h. Add 'origin' field to struct directive. Add origin values to DIRECTIVE_TABLE. Generate the strings and function names on the fly. Take the #sccs entry out of the table if SCCS_DIRECTIVE is not defined. (_cpp_handle_directive): Decide if the # was at the beginning of the line here. Issue -pedantic warnings for extended directives here. Warn about K+R directives with the # indented, and C89/extended directives with the # not indented, here. (do_import, do_include_next, do_warning, do_ident, do_sccs, do_assert, do_unassert): Don't issue pedantic warning here. * cpphash.h: Add CPP_WTRADITIONAL macro. * cpplib.h (struct cpp_options): Rename warn_stringify to warn_traditional; update comments. * cppinit.c (handle_option): Set warn_traditional not warn_stringify. * cpphash.c: Replace CPP_OPTION (pfile, warn_stringify) with CPP_WTRADITIONAL (pfile). * cpplex.c (_cpp_lex_token): Don't decide if directives should be ignored in -traditional mode here. * cpplex.c: Copy ISTABLE macros from cppinit.c, and adapt them to initialize speccase[] and trigraph_map[]. Delete all references to pfile->input_speccase. Always treat '?' as a special character. Remove table-initialization code from _cpp_init_input_buffer. * cpplib.h (struct cpp_reader): Remove input_speccase field. * cppinit.c (cpp_cleanup): Don't free input_speccase. From-SVN: r32860 --- gcc/cpphash.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc/cpphash.h') diff --git a/gcc/cpphash.h b/gcc/cpphash.h index 33aa0d1..3d0a147 100644 --- a/gcc/cpphash.h +++ b/gcc/cpphash.h @@ -226,7 +226,9 @@ extern unsigned char _cpp_IStable[256]; #define CPP_PRINT_DEPS(PFILE) CPP_OPTION (PFILE, print_deps) #define CPP_TRADITIONAL(PFILE) CPP_OPTION (PFILE, traditional) #define CPP_PEDANTIC(PFILE) \ - (CPP_OPTION (PFILE, pedantic) && !CPP_BUFFER (pfile)->system_header_p) + (CPP_OPTION (PFILE, pedantic) && !CPP_BUFFER (PFILE)->system_header_p) +#define CPP_WTRADITIONAL(PF) \ + (CPP_OPTION (PF, warn_traditional) && !CPP_BUFFER (PF)->system_header_p) /* CPP_IS_MACRO_BUFFER is true if the buffer contains macro expansion. (Note that it is false while we're expanding macro *arguments*.) */ -- cgit v1.1