diff options
author | Zack Weinberg <zack@wolery.cumb.org> | 2000-03-02 20:14:32 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-03-02 20:14:32 +0000 |
commit | c45da1ca925d67685ca633b48a4ca1ec44dfaca1 (patch) | |
tree | 83b50be95e2db0783f35dfe9f8625210e9368a40 /gcc/cpplib.h | |
parent | e97f22c9757e8c7bbf123b6ec1af68791f41d6fa (diff) | |
download | gcc-c45da1ca925d67685ca633b48a4ca1ec44dfaca1.zip gcc-c45da1ca925d67685ca633b48a4ca1ec44dfaca1.tar.gz gcc-c45da1ca925d67685ca633b48a4ca1ec44dfaca1.tar.bz2 |
cppfiles.c (cpp_read_file): New function.
* cppfiles.c (cpp_read_file): New function.
* cpphash.c (collect_expansion): Make sure to reset last_token
to NORM when we hit a string. Handle trailing whitespace
properly when the expansion is empty.
(create_definition): Disable line commands while parsing the
directive line.
(dump_definition): If pfile->lineno == 0, output a line
command ahead of the dump, and add a trailing newline.
* cppinit.c (append_include_chain): Add fifth argument, which
indicates whether or not system headers are C++ aware.
(initialize_standard_includes): New function,
broken out of read_and_prescan. Pass 'cxx_aware' value from
the include_defaults_array on to append_include_chain.
(dump_special_to_buffer): Const-ify char array.
(builtin_array): Don't dump __BASE_FILE__.
(cpp_start_read): Use cpp_read_file. Reorder code for
clarity. Don't output line commands here for -D/-A/-U
switches. Don't call deps_output for files included with
-include or -imacros.
* cpplib.c (do_define): Don't pay any attention to the second
argument.
(cpp_expand_to_buffer): Disable line commands while scanning.
(output_line_command): Work in the file buffer.
* cpplib.h: Remove no_record_file flag from struct cpp_reader.
Fix formatting of comments. Prototype cpp_read_file.
From-SVN: r32293
Diffstat (limited to 'gcc/cpplib.h')
-rw-r--r-- | gcc/cpplib.h | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/gcc/cpplib.h b/gcc/cpplib.h index 6c16494..60d0eed 100644 --- a/gcc/cpplib.h +++ b/gcc/cpplib.h @@ -34,7 +34,8 @@ typedef struct cpp_reader cpp_reader; typedef struct cpp_buffer cpp_buffer; typedef struct cpp_options cpp_options; -enum cpp_token { +enum cpp_token +{ CPP_EOF = -1, CPP_OTHER = 0, CPP_COMMENT = 1, @@ -188,23 +189,23 @@ struct cpp_reader struct if_stack *if_stack; /* Nonzero means we have printed (while error reporting) a list of - containing files that matches the current status. */ + containing files that matches the current status. */ char input_stack_listing_current; - /* If non-zero, macros are not expanded. */ + /* If non-zero, macros are not expanded. */ char no_macro_expand; /* If non-zero, directives cause a hard error. Used when parsing macro arguments. */ char no_directives; - /* Print column number in error messages. */ + /* Print column number in error messages. */ char show_column; - /* We're printed a warning recommending against using #import. */ + /* We're printed a warning recommending against using #import. */ char import_warning; - /* If true, character between '<' and '>' are a single (string) token. */ + /* If true, character between '<' and '>' are a single (string) token. */ char parsing_include_directive; /* If true, # introduces an assertion (see do_assert) */ @@ -214,18 +215,13 @@ struct cpp_reader char parsing_define_directive; /* True if escape sequences (as described for has_escapes in - parse_buffer) should be emitted. */ + parse_buffer) should be emitted. */ char output_escapes; /* 0: Have seen non-white-space on this line. 1: Only seen white space so far on this line. - 2: Only seen white space so far in this file. */ - char only_seen_white; - - /* Nonzero means this file was included with a -imacros or -include - command line and should not be recorded as an include file. */ - - char no_record_file; + 2: Only seen white space so far in this file. */ + char only_seen_white; long lineno; @@ -432,7 +428,6 @@ struct cpp_options { char remap; /* Nonzero means don't output line number information. */ - char no_line_commands; /* Nonzero means -I- has been seen, @@ -713,6 +708,7 @@ extern int find_include_file PARAMS ((cpp_reader *, const char *, int *)); extern int finclude PARAMS ((cpp_reader *, int, struct include_hash *)); +extern int cpp_read_file PARAMS ((cpp_reader *, const char *)); extern void deps_output PARAMS ((cpp_reader *, const char *, int)); extern struct include_hash *include_hash PARAMS ((cpp_reader *, const char *, int)); |