diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-01-03 21:43:09 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-01-03 21:43:09 +0000 |
commit | e484a1cc4dea83791a2a5fd2f1996dd07a699dc2 (patch) | |
tree | 3504047f1de0b4702b0d0d4991c780df4a3aad89 /gcc/cppinit.c | |
parent | 625bfde66084a35c76984479eea4debb219d384d (diff) | |
download | gcc-e484a1cc4dea83791a2a5fd2f1996dd07a699dc2.tar.gz |
* cpperror.c: Update comments and copyright.
* cppexp.c, cppfiles.c, cpphash.c, cpphash.h, cppinit.c,
cpplex.c, cpplib.c, cpplib.h, cppmacro.c, cppmain.c: Similarly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48522 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r-- | gcc/cppinit.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c index 3ddf429452a..93b27025d47 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -54,7 +54,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* A `struct pending_option' remembers one -D, -A, -U, -include, or -imacros switch. */ - typedef void (* cl_directive_handler) PARAMS ((cpp_reader *, const char *)); struct pending_option { @@ -158,7 +157,6 @@ END /* Given a colon-separated list of file names PATH, add all the names to the search path for include files. */ - static void path_include (pfile, list, path) cpp_reader *pfile; @@ -200,7 +198,9 @@ path_include (pfile, list, path) } /* Append DIR to include path PATH. DIR must be allocated on the - heap; this routine takes responsibility for freeing it. */ + heap; this routine takes responsibility for freeing it. CXX_AWARE + is non-zero if the header contains extern "C" guards for C++, + otherwise it is zero. */ static void append_include_chain (pfile, dir, path, cxx_aware) cpp_reader *pfile; @@ -331,11 +331,7 @@ remove_dup_dirs (pfile, head) system, after. Remove duplicate dirs (as determined by INO_T_EQ()). The system_include and after_include chains are never referred to again after this function; all access is through the - bracket_include path. - - For the future: Check if the directory is empty (but - how?) and possibly preload the include hash. */ - + bracket_include path. */ static void merge_include_chains (pfile) cpp_reader *pfile; @@ -389,9 +385,8 @@ merge_include_chains (pfile) CPP_OPTION (pfile, bracket_include) = brack; } -/* Sets internal flags correctly for a given language, and defines - macros if necessary. */ - +/* A set of booleans indicating what CPP features each source language + requires. */ struct lang_flags { char c99; @@ -419,6 +414,7 @@ static const struct lang_flags lang_defaults[] = /* ASM */ { 0, 0, 0, 1, 0, 0, 1, 0 } }; +/* Sets internal flags correctly for a given language. */ static void set_lang (pfile, lang) cpp_reader *pfile; @@ -453,7 +449,6 @@ opt_comp (p1, p2) /* init initializes library global state. It might not need to do anything depending on the platform and compiler. */ - static void init_library () { @@ -540,7 +535,7 @@ cpp_create_reader (lang) } /* Free resources used by PFILE. Accessing PFILE after this function - returns leads to undefined behaviour. */ + returns leads to undefined behaviour. Returns the error count. */ int cpp_destroy (pfile) cpp_reader *pfile; @@ -613,7 +608,6 @@ cpp_destroy (pfile) ULP value is the global user_label_prefix Also, macros with CPLUS set in the flags field are entered only for C++. */ - struct builtin { const U_CHAR *name; @@ -689,7 +683,7 @@ static const struct builtin builtin_array[] = builtin_array + sizeof(builtin_array)/sizeof(struct builtin) /* Subroutine of cpp_read_main_file; reads the builtins table above and - enters the macros into the hash table. */ + enters them, and language-specific macros, into the hash table. */ static void init_builtins (pfile) cpp_reader *pfile; @@ -865,7 +859,7 @@ init_standard_includes (pfile) } } -/* Pushes a -imacro and -include file given on the command line onto +/* Pushes a command line -imacro and -include file indicated by P onto the buffer stack. Returns non-zero if successful. */ static bool push_include (pfile, p) @@ -1126,6 +1120,7 @@ cpp_finish (pfile) _cpp_report_missing_guards (pfile); } +/* Add a directive to be handled later in the initialization phase. */ static void new_pending_directive (pend, text, handler) struct cpp_pending *pend; @@ -1318,7 +1313,6 @@ parse_option (input) /* Handle one command-line option in (argc, argv). Can be called multiple times, to handle multiple sets of options. Returns number of strings consumed. */ - int cpp_handle_option (pfile, argc, argv) cpp_reader *pfile; @@ -1871,6 +1865,7 @@ init_dependency_output (pfile) } } +/* Handle --help output. */ static void print_help () { |