diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-08-12 06:02:53 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-08-12 06:02:53 +0000 |
commit | 79cf3ec10c796d1bf7911b7da6d6fcbdd79b049e (patch) | |
tree | 82b18582d84748178bc2373cabf50220825d9659 /gcc/c-common.c | |
parent | a9c6f96edd65142dab0063066ae635cb5b445497 (diff) | |
download | gcc-79cf3ec10c796d1bf7911b7da6d6fcbdd79b049e.tar.gz |
* c-common.c (STDC_0_IN_SYSTEM_HEADERS, c_common_init): Move
to c-copts.c.
(warn_multichar): Die.
(cb_register_builtins): Export.
* c-common.h (warn_multichar, preprocess_file): Remove.
(cb_register_builtins): New.
* c-lang.c (c_init): Remove.
(LANG_HOOKS_INIT): Use c_objc_common_init.
* c-lex.c (init_c_lex): Don't canonicalize filename.
* c-opts.c (in_fname, STDC_0_IN_SYSTEM_HEADERS): New.
(preprocess_file): Make static. Update for cpplib.
(c_common_decode_option): Remove warn_multichar. Use in_fname.
(c_common_post_options): Set some cpp options here.
(c_common_init): Move from c-common.c.
* cppinit.c (cpp_post_options): Don't canonicalize in_fname.
* cpplib.h (struct cpp_options): Remove in_fname.
(cpp_preprocess_file): Update.
* cppmain.c (cpp_preprocess_file): Update for new prototypes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56223 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r-- | gcc/c-common.c | 58 |
1 files changed, 1 insertions, 57 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c index d925e917482..2268d72c754 100644 --- a/gcc/c-common.c +++ b/gcc/c-common.c @@ -83,10 +83,6 @@ cpp_reader *parse_in; /* Declared in c-pragma.h. */ : "long long unsigned int")) #endif -#ifndef STDC_0_IN_SYSTEM_HEADERS -#define STDC_0_IN_SYSTEM_HEADERS 0 -#endif - #ifndef REGISTER_PREFIX #define REGISTER_PREFIX "" #endif @@ -310,10 +306,6 @@ int warn_conversion; int warn_unknown_pragmas; /* Tri state variable. */ -/* Nonzero means warn about use of multicharacter literals. */ - -int warn_multichar = 1; - /* Warn about format/argument anomalies in calls to formatted I/O functions (*printf, *scanf, strftime, strfmon, etc.). */ @@ -692,8 +684,6 @@ static int if_stack_space = 0; /* Stack pointer. */ static int if_stack_pointer = 0; -static void cb_register_builtins PARAMS ((cpp_reader *)); - static tree handle_packed_attribute PARAMS ((tree *, tree, tree, int, bool *)); static tree handle_nocommon_attribute PARAMS ((tree *, tree, tree, int, @@ -4672,7 +4662,7 @@ boolean_increment (code, arg) } /* Hook that registers front end and target-specific built-ins. */ -static void +void cb_register_builtins (pfile) cpp_reader *pfile; { @@ -4884,52 +4874,6 @@ builtin_define_type_max (macro, type, is_long) cpp_define (parse_in, buf); } -/* Front end initialization common to C, ObjC and C++. */ -const char * -c_common_init (filename) - const char *filename; -{ - cpp_options *options = cpp_get_options (parse_in); - - /* Set up preprocessor arithmetic. Must be done after call to - c_common_nodes_and_builtins for wchar_type_node to be good. */ - options->precision = TYPE_PRECISION (intmax_type_node); - options->char_precision = TYPE_PRECISION (char_type_node); - options->int_precision = TYPE_PRECISION (integer_type_node); - options->wchar_precision = TYPE_PRECISION (wchar_type_node); - options->unsigned_wchar = TREE_UNSIGNED (wchar_type_node); - options->unsigned_char = !flag_signed_char; - options->warn_multichar = warn_multichar; - options->stdc_0_in_system_headers = STDC_0_IN_SYSTEM_HEADERS; - - /* We want -Wno-long-long to override -pedantic -std=non-c99 - and/or -Wtraditional, whatever the ordering. */ - options->warn_long_long - = warn_long_long && ((!flag_isoc99 && pedantic) || warn_traditional); - - /* Register preprocessor built-ins before calls to - cpp_main_file. */ - cpp_get_callbacks (parse_in)->register_builtins = cb_register_builtins; - - /* NULL is passed up to toplev.c and we exit quickly. */ - if (flag_preprocess_only) - { - preprocess_file (); - return NULL; - } - - /* Do this before initializing pragmas, as then cpplib's hash table - has been set up. */ - filename = init_c_lex (filename); - - init_pragma (); - - if (!c_attrs_initialized) - c_init_attributes (); - - return filename; -} - static void c_init_attributes () { |