summaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-06 16:24:05 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2007-09-06 16:24:05 +0000
commit931b0a0f9ddae71dbef720adf1b1a6707232b223 (patch)
treeae71ddc2b3a15a8f7bcf6b36b1592c9fb9c5138e /gcc/tree.h
parent71bf42bb5fe1645ee4cddda22be4fd850749b75f (diff)
downloadgcc-931b0a0f9ddae71dbef720adf1b1a6707232b223.tar.gz
gcc:
* tree-cfg.c (remove_bb): Only warn if line is non-zero. * c-pch.c (c_common_read_pch): Restore current location after reading PCH file. * tree.c (expand_location): Update. (expr_filename): Changed return type. Unified the two cases. (expr_lineno): Likewise. (annotate_with_file_line): Don't use EXPR_LINENO and EXPR_FILENAME as lvalues. * toplev.c (line_table): Changed type. (general_init): Update. (realloc_for_line_map): New function. (general_init): Allocate line_table using GC. * fix-header.c (line_table): Changed type. (read_scan_file): Update. (read_scan_file): Update. * c-ppoutput.c (maybe_print_line): Update. (print_line): Update. (cb_line_change): Update. (cb_define): Update. (pp_file_change): Update. * c-opts.c (c_common_init_options): Update. (finish_options): Update. (push_command_line_include): Update. * c-lex.c (cb_line_change): Update. (cb_def_pragma): Update. (cb_define): Update. (cb_undef): Update. (c_lex_with_flags): Use cpp_get_token_with_location. * input.h (line_table): Changed type. (location_from_locus): New macro. * tree.h (EXPR_FILENAME): No longer an lvalue. (EXPR_LINENO): Likewise. (expr_locus, set_expr_locus): Declare separately for USE_MAPPED_LOCATION. (expr_filename, expr_lineno): Changed return type. * gimplify.c (tree_to_gimple_tuple): Use SET_EXPR_LOCUS. * cfgexpand.c (expand_gimple_cond_expr): Use location_from_locus. (expand_gimple_basic_block): Likewise. * final.c (final_scan_insn): Use expanded_location. gcc/cp: * decl.c (finish_function): Put return's location on line zero of file. gcc/fortran: * scanner.c (get_file): Update. (load_file): Update. (gfc_next_char_literal): Use gfc_linebuf_linenum. * f95-lang.c (gfc_init): Update. * gfortran.h (gfc_linebuf_linenum): New macro. gcc/java: * lang.c (java_post_options): Update. * jcf-parse.c (set_source_filename): Update. (give_name_to_class): Update. (jcf_parse): Update. (duplicate_class_warning): Update. (parse_class_file): Update. (java_parse_file): Update. * expr.c (expand_byte_code): Update. gcc/testsuite: * lib/g++.exp (g++_target_compile): Use -fno-show-column. gcc/treelang: * tree1.c (treelang_init): Update. (treelang_parse_file): Update. (treelang_parse_file): Update. (treelang_parse_file): Update. * lex.l: Update. (update_lineno_charno): Likewise. libcpp: * internal.h (struct cpp_reader) <invocation_location>: New field. (struct cpp_reader) <set_invocation_location>: Likewise. * init.c (cpp_set_line_map): New function. * line-map.c (linemap_add): Use linemap's allocator. * include/line-map.h (GTY): Define. (line_map_realloc): New typedef. (struct line_map): Mark with GTY. (struct line_maps): Likewise. (struct line_maps) <maps>: Likewise. (struct line_maps) <reallocator>: New field. * include/symtab.h (GTY): Conditionally define. * include/cpplib.h (cpp_set_line_map): Declare. (cpp_get_token_with_location): Declare. * macro.c (cpp_get_token): Set invocation_location on the reader. (cpp_get_token_with_location): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128190 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.h')
-rw-r--r--gcc/tree.h25
1 files changed, 10 insertions, 15 deletions
diff --git a/gcc/tree.h b/gcc/tree.h
index c274fb6ec24..5a74cccebba 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1598,8 +1598,8 @@ struct tree_constructor GTY(())
#define EXPR_HAS_LOCATION(NODE) expr_has_location ((NODE))
#define EXPR_LOCUS(NODE) expr_locus ((NODE))
#define SET_EXPR_LOCUS(NODE, FROM) set_expr_locus ((NODE), (FROM))
-#define EXPR_FILENAME(NODE) *(expr_filename ((NODE)))
-#define EXPR_LINENO(NODE) *(expr_lineno ((NODE)))
+#define EXPR_FILENAME(NODE) (expr_filename ((NODE)))
+#define EXPR_LINENO(NODE) (expr_lineno ((NODE)))
/* True if a tree is an expression or statement that can have a
location. */
@@ -4840,22 +4840,17 @@ extern tree find_compatible_field (tree, tree);
extern location_t expr_location (const_tree);
extern void set_expr_location (tree, location_t);
extern bool expr_has_location (const_tree);
-extern
-#ifdef USE_MAPPED_LOCATION
-source_location *
-#else
-source_locus
-#endif
-expr_locus (const_tree);
-extern void set_expr_locus (tree,
+
#ifdef USE_MAPPED_LOCATION
- source_location *loc
+extern source_locus *expr_locus (const_tree);
+extern void set_expr_locus (tree, source_location *);
#else
- source_locus loc
+extern source_locus expr_locus (const_tree);
+extern void set_expr_locus (tree, source_locus loc);
#endif
- );
-extern const char **expr_filename (const_tree);
-extern int *expr_lineno (const_tree);
+extern const char *expr_filename (const_tree);
+extern int expr_lineno (const_tree);
+
extern tree *tree_block (tree);
extern tree *generic_tree_operand (tree, int);
extern tree *generic_tree_type (tree);