summaryrefslogtreecommitdiff
path: root/gcc/c-opts.c
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>2004-06-30 11:05:07 -0700
committerPer Bothner <bothner@gcc.gnu.org>2004-06-30 11:05:07 -0700
commit3c20847b8301eb9aa407ee8273b6e738e7067ee0 (patch)
tree3a5eb1a7eff65640bfe8d3933a6c06578d9f38ce /gcc/c-opts.c
parentc166747038bc41ee6702618828e5c915cc4e47ea (diff)
downloadgcc-3c20847b8301eb9aa407ee8273b6e738e7067ee0.tar.gz
Conditionally compile support for --enable-mapped_location.
* basic-block.h (struct edge_def): Use new source_locus typedef. * c-common.c (fname_decl): Update save/clear/store of input_location. (c_do_switch_warnings): Update for USE_MAPPED_LOCATION case. * c-decl.c: Likewise. * c-dump.c (dump_stmt): Likewise. * c-gimplify.c (c-gimplify.c): Generalize using SET_EXPR_LOCATION. * c-lex.c (cb_line_change): If USE_MAPPED_LOCATION use token's src_loc to set input_location direction, rather than using linemap_lookup. (fe_file_change, cb_def_pragma): Again use source_location directly. * c-opts.c (saved_lineno): Remove static variable. (c_common_post_options, c_common_init): Don't bothner to save, clear and restore input_Location - now handled by lang_dependent_init. * function.c (init_function_start): Use new DECL_IS_BUILTIN macro. * xcoffout.c (xcoff_assign_fundamental_type_number): Likewise. From-SVN: r83919
Diffstat (limited to 'gcc/c-opts.c')
-rw-r--r--gcc/c-opts.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/gcc/c-opts.c b/gcc/c-opts.c
index 06b8ed0b016..6ae668b1a6c 100644
--- a/gcc/c-opts.c
+++ b/gcc/c-opts.c
@@ -51,8 +51,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#define TARGET_OPTF(ARG)
#endif
-static int saved_lineno;
-
/* CPP's options. */
static cpp_options *cpp_opts;
@@ -998,7 +996,7 @@ c_common_post_options (const char **pfilename)
init_c_lex ();
/* Yuk. WTF is this? I do know ObjC relies on it somewhere. */
- input_line = 0;
+ input_location = UNKNOWN_LOCATION;
}
cb = cpp_get_callbacks (parse_in);
@@ -1006,8 +1004,7 @@ c_common_post_options (const char **pfilename)
cb->dir_change = cb_dir_change;
cpp_post_options (parse_in);
- saved_lineno = input_line;
- input_line = 0;
+ input_location = UNKNOWN_LOCATION;
/* If an error has occurred in cpplib, note it so we fail
immediately. */
@@ -1033,8 +1030,6 @@ c_common_post_options (const char **pfilename)
bool
c_common_init (void)
{
- input_line = saved_lineno;
-
/* Set up preprocessor arithmetic. Must be done after call to
c_common_nodes_and_builtins for type nodes to be good. */
cpp_opts->precision = TYPE_PRECISION (intmax_type_node);