diff options
author | Neil Booth <neilb@earthling.net> | 2000-12-11 07:45:16 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2000-12-11 07:45:16 +0000 |
commit | 0bda476066124a32156a37252d1d0c127c5a15be (patch) | |
tree | 1cf059e8adaf7964d2336feb8095b222fd1c04cb /gcc/cpplib.h | |
parent | c5afc1922c0ac026bfd781289bfe5d067f19204a (diff) | |
download | gcc-0bda476066124a32156a37252d1d0c127c5a15be.zip gcc-0bda476066124a32156a37252d1d0c127c5a15be.tar.gz gcc-0bda476066124a32156a37252d1d0c127c5a15be.tar.bz2 |
cpperror.c (print_location): New function.
* cpperror.c (print_location): New function.
(print_containing_files): Simplify.
(_cpp_begin_message): Simplify and use print_location.
* cppfiles.c (stack_include_file): Update.
(_cpp_pop_file_buffer): Update.
* cpphash.h (struct cpp_buffer): New members
include_stack_listed and type.
* cpplib.c (_cpp_handle_directive): Buffer->inc is not null.
(run_directive): Take buffer type. cpp_push_buffer cannot fail.
(_cpp_do__Pragma, cpp_define, _cpp_define_builtin, cpp_undef,
handle_assertion): Update.
(cpp_push_buffer): Take a buffer type and file name.
(cpp_pop_buffer): Update. Clear include_stack_listed.
* cpplib.h (input_stack_listing_current): Remove.
(enum cpp_buffer_type): New.
(cpp_push_buffer): New prototype.
* cppmacro.c (builtin_macro): Simplify; buffer cannot be null.
* fix-header.c (read_scan_file): Update.
From-SVN: r38186
Diffstat (limited to 'gcc/cpplib.h')
-rw-r--r-- | gcc/cpplib.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/cpplib.h b/gcc/cpplib.h index e14cbd4..18c3baa 100644 --- a/gcc/cpplib.h +++ b/gcc/cpplib.h @@ -606,10 +606,6 @@ struct cpp_reader preprocessor. */ struct spec_nodes spec_nodes; - /* Nonzero means we have printed (while error reporting) a list of - containing files that matches the current status. */ - unsigned char input_stack_listing_current; - /* We're printed a warning recommending against using #import. */ unsigned char import_warning; @@ -634,6 +630,10 @@ struct cpp_reader /* Name under which this program was invoked. */ extern const char *progname; +/* Where does this buffer come from? A file, a builtin macro, a + command-line option, or a _Pragma operator. */ +enum cpp_buffer_type {BUF_FILE, BUF_BUILTIN, BUF_CL_OPTION, BUF_PRAGMA}; + /* The structure of a node in the hash table. The hash table has entries for all identifiers: either macros defined by #define commands (type NT_MACRO), assertions created with #assert @@ -729,7 +729,9 @@ extern void cpp_undef PARAMS ((cpp_reader *, const char *)); extern void cpp_unassert PARAMS ((cpp_reader *, const char *)); extern cpp_buffer *cpp_push_buffer PARAMS ((cpp_reader *, - const unsigned char *, size_t)); + const unsigned char *, size_t, + enum cpp_buffer_type, + const char *)); extern cpp_buffer *cpp_pop_buffer PARAMS ((cpp_reader *)); extern int cpp_defined PARAMS ((cpp_reader *, const unsigned char *, int)); |