aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpplib.h
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2001-01-07 15:17:07 +0000
committerNeil Booth <neil@gcc.gnu.org>2001-01-07 15:17:07 +0000
commit963024335a5ad4d219d0feedc4e08149822438ba (patch)
treec1c9be83692efba34fd6a681a9cf6a699a78a8c9 /gcc/cpplib.h
parentb34878a37be4bd942b0460be0e5f9b3c8cbe0b17 (diff)
downloadgcc-963024335a5ad4d219d0feedc4e08149822438ba.zip
gcc-963024335a5ad4d219d0feedc4e08149822438ba.tar.gz
gcc-963024335a5ad4d219d0feedc4e08149822438ba.tar.bz2
c-lang.c (c_post_options): Call cpp_post_options.
* c-lang.c (c_post_options): Call cpp_post_options. * cppmain.c (main): Similarly. * fix-header.c (read_scan_file): Similarly. * cp/decl2.c (cxx_post_options): Similarly. * objc/objc-act.c (objc_post_options): Similarly. * cppinit.c (cpp_start_read): Move option consistency checks to cpp_post_options. Don't call init_dependency_output. If needed, add default target and main file dependency. (OPT_MD, OPT_MMD): Remove. (OPT_MF): New. (cpp_handle_option): Update for OPT_* changes. (cpp_post_options): New. (init_dependency_output): Command line -MF overrides environment variables. Don't set default target etc. Suppress output if dependencies are going to stdout. (print_help): Update. * cpplib.h (cpp_post_options): New. * gcc.c (cpp_options): Update for -MD, -MMD, -MF. From-SVN: r38777
Diffstat (limited to 'gcc/cpplib.h')
-rw-r--r--gcc/cpplib.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/gcc/cpplib.h b/gcc/cpplib.h
index 7b53d09..d5063b9 100644
--- a/gcc/cpplib.h
+++ b/gcc/cpplib.h
@@ -704,14 +704,25 @@ struct cpp_hashnode
union tree_node *fe_value; /* Front end value. */
};
+/* Call this first to get a handle to pass to other functions. */
extern cpp_reader *cpp_create_reader PARAMS ((enum c_lang));
+
+/* Now call cpp_handle_option[s] to handle 1[or more] switches. The
+ return value is the number of arguments used. If
+ cpp_handle_options returns without using all arguments, it couldn't
+ understand the next switch. When there are no switches left, you
+ must call cpp_post_options before calling cpp_start_read. Only
+ after cpp_post_options are the contents of the cpp_options
+ structure reliable. */
+extern int cpp_handle_options PARAMS ((cpp_reader *, int, char **));
+extern int cpp_handle_option PARAMS ((cpp_reader *, int, char **));
+extern void cpp_post_options PARAMS ((cpp_reader *));
+
extern unsigned int cpp_token_len PARAMS ((const cpp_token *));
extern unsigned char *cpp_token_as_text PARAMS ((cpp_reader *,
const cpp_token *));
extern unsigned char *cpp_spell_token PARAMS ((cpp_reader *, const cpp_token *,
unsigned char *));
-extern int cpp_handle_options PARAMS ((cpp_reader *, int, char **));
-extern int cpp_handle_option PARAMS ((cpp_reader *, int, char **));
extern void cpp_register_pragma PARAMS ((cpp_reader *,
const char *, const char *,
void (*) PARAMS ((cpp_reader *))));