summaryrefslogtreecommitdiffstats
path: root/gcc/line-map.c
Commit message (Collapse)AuthorAgeFilesLines
* * cppfiles.c (stack_file): Leave filename as "" rather than "<stdin>".geoffk2003-07-301-3/+12
| | | | | | | | | * line-map.h (linemap_add): Update comments. * line-map.c (linemap_add): Update comments, interpret zero-length filename as "<stdin>". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69952 138bc75d-0d04-0410-961f-82ee72b054a4
* * line-map.c (add_line_map): Handle invalid LEAVE request.bothner2003-07-221-3/+9
| | | | | | | Fixes PR preprocessor/11361. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69688 138bc75d-0d04-0410-961f-82ee72b054a4
* * hashtable.c (approx_sqrt): Make static.zack2003-07-221-7/+8
| | | | | | | | | | | | | | | | * hashtable.h: Don't prototype approx_sqrt. * line-map.c (init_line_maps): Rename linemap_init. (free_line_maps): Rename linemap_free. (add_line_map): Rename linemap_add. (lookup_line): Rename linemap_lookup. (print_containing_files): Rename linemap_print_containing_files. * linemap.h: Update to match. * cpperror.c, cppinit.c, cpplib.c, cppmacro.c: Update calls to linemap routines to use new names. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69672 138bc75d-0d04-0410-961f-82ee72b054a4
* * alias.c alloc-pool.c bitmap.c bitmap.h bt-load.c builtins.cghazi2003-07-191-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | c-common.c c-decl.c c-incpath.c c-lex.c c-opts.c c-parse.in c-pragma.c c-typeck.c calls.c cfg.c cfganal.c cfgloop.c cfgrtl.c collect2.c combine.c conflict.c coverage.c cppexp.c cppfiles.c cpphash.c cppinit.c cpplex.c cpplib.c cppmacro.c cppspec.c cpptrad.c cse.c cselib.c dbxout.c defaults.h df.c dominance.c dwarf2out.c dwarfout.c emit-rtl.c except.c expmed.c expr.c final.c fix-header.c flow.c fold-const.c function.c gcc.c gccspec.c gcov.c gcse.c genattr.c genattrtab.c genautomata.c genconditions.c genemit.c genextract.c genoutput.c genrecog.c gensupport.c ggc-page.c ggc-simple.c global.c graph.c haifa-sched.c hashtable.c integrate.c jump.c langhooks.c lcm.c line-map.c local-alloc.c loop.c mips-tdump.c mips-tfile.c mkdeps.c optabs.c params.c postreload.c prefix.c print-tree.c protoize.c ra-build.c ra-colorize.c ra-rewrite.c ra.c recog.c reg-stack.c regclass.c regmove.c regrename.c reload.c reload1.c reorg.c resource.c sbitmap.c sched-deps.c sched-rgn.c sched-vis.c sdbout.c simplify-rtx.c ssa-ccp.c ssa.c stmt.c stor-layout.c timevar.c tlink.c toplev.c tree-dump.c tree.c unroll.c unwind-dw2-fde.c varasm.c varray.c vmsdbgout.c xcoffout.c: Remove unnecessary casts. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69587 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (LIBCPP_DEPS): Remove coretypes.h and $(TM_H).zack2003-07-131-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | (hashtable.o, line-map.o, mkdeps.o): Likewise, from dependency list. Move these all together down by cpplib. * cpplib.h: Don't refer to MAX_WCHAR_TYPE_SIZE when determining definition of CPPCHAR_SIGNED_T. * cppcharset.c, cpperror.c, cppexp.c, cppfiles.c, cpphash.c, cppinit.c * cpplex.c, cpplib.c, cppmacro.c, cpppch.c, cpptrad.c, hashtable.c * line-map.c, mkdeps.c: Don't include coretypes.h or tm.h. * cpphash.c (_cpp_init_hashtable): Don't use gcc_obstack_init. * cppinit.c (cpp_create_reader): Likewise. * cpphash.h (scan_out_logical_line): Rename _cpp_scan_out_logical_line. * cpptrad.c: Likewise. All callers changed. * cpplib.c: All callers changed. * c-ppoutput.c: Replace 'uchar' with 'unsigned char' throughout. * hashtable.h: Define GTY(x) to nothing here too. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69298 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcse.c: Fix misspelling.kraai2003-07-031-1/+1
| | | | | | | | * line-map.c: Likewise. * config/dsp16xx/dsp16xx.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68865 138bc75d-0d04-0410-961f-82ee72b054a4
* * line-map.c, line-map.h: Convert to ISO prototypes.neil2003-06-201-22/+9
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68242 138bc75d-0d04-0410-961f-82ee72b054a4
* Various cleanups to help compile server.bothner2003-03-201-4/+4
| | | | | | | | | | * line-map.c (add_line_map): Allow leaving the outermost file. Allowing entering an outermost-file after the initial time. * toplev.c (pop_srcloc): Allow popping from initial file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64616 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge basic-improvements-branch to trunkzack2002-12-161-0/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60174 138bc75d-0d04-0410-961f-82ee72b054a4
* * cppfiles.c (stack_include_file): line-map.c now handles includeneil2001-08-211-10/+15
| | | | | | | | | | | | | | | | | | | | | depth. (handle_missing_handler): Similarly. (_cpp_execute_include): Similarly. (_cpp_pop_file_buffer): Similarly. * cpphash.h (struct cpp_reader): Remove system_include_depth, buffer_stack_depth and include_depth. * cpplib.c (do_include_common): line-map.c now handles include depth. (cpp_push_buffer): Similarly. (_cpp_pop_buffer): Similarly. * cppmacro.c (builtin_macro): Update. * line-map.c (init_line_maps): Set depth. (add_line_map): Increment "used" earlier. Update and use the include depth. (trace_include): Use the include depth. * line-map.h (struct line_maps): New member depth. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45085 138bc75d-0d04-0410-961f-82ee72b054a4
* * cppfiles.c (stack_include_file): Don't handle -H here.neil2001-08-211-1/+22
| | | | | | | | | | | * cppinit.c (cpp_start_read): Set include tracing after cpp_post_options and after stacking the main file. * line-map.c (trace_include): New. (init_line_maps, add_line_map): Update. * line-map.h (struct line_maps): New member trace_includes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45084 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-lex.c (map): Make const.neil2001-08-111-15/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cb_file_change): Update for callback passing a line map. Don't assume we have a previous map. Remove sanity check about popping too many files. * cpperror.c (print_location): Make map const. * cppfiles.c (stack_include_file): Update; line maps now hold sysp. (cpp_make_system_header): Similarly. (search_from): Similarly. (_cpp_execute_include): Don't remember where we came from. * cpphash.h (struct cpp_buffer): Remove return_to_line, sysp. (struct cpp_reader): Make map const. (CPP_IN_SYSTEM_HEADER, _cpp_do_file_change): Update. * cpplib.c (do_line): Update; line maps now hold sysp. (cpp_push_buffer): Similarly. (_cpp_do_file_change): Similarly; callback with map instead. (cpp_get_line_maps): Constify return value. (_cpp_pop_buffer): Update. * cpplib.h (struct cpp_file_change): Remove. (struct cpp_callbacks): Update. (cpp_get_line_maps): Constify return value. * cppmacro.c (_cpp_create_definition): Update. * cppmain.c (struct printer): Constify map. (maybe_print_line): Similarly. (print_line): Similarly. Deduce flags 1 and 2 here. (cb_file_change): Update. * line-map.c (free_line_maps): Warn regardless. (add_line_map): Return pointer to const. When passed NULL to_file with LC_LEAVE, use the obvious values for the return point so the caller doesn't have to figure them out. (lookup_line): Return pointer to const. (print_containing_files): Take pointer to const. * line-map.h (struct line_map): New members reason, sysp. (add_line_map): Return pointer to const. (lookup_line): Similarly. (print_containing_files): Take pointer to const. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44789 138bc75d-0d04-0410-961f-82ee72b054a4
* * cpperror.c (print_containing_files): Moved to line-map.c.neil2001-08-061-9/+73
| | | | | | | | | | | | | | | | | | | | | | | | (print_location): line-map.c handles re-listing or otherwise. * cpphash.h (struct lexer_state): Remove next_bol. (struct cpp_buffer): Remove include_stack_listed. * cpplib.c (do_line, cpp_push_buffer, _cpp_pop_buffer): Remove faked buffer handling. (_cpp_do_file_change): Tweak. * cpplib.h (enum cpp_buffer_type): Remove BUF_FAKE. * cppmain.c (struct printer): Remove filename. (print_line, cb_file_change): Update accordingly. * line-map.c: Include intl.h. (init_line_maps): Initialize last_listed. (free_line_maps): Sanity check, warn if ENABLED_CHECKING. (add_line_map): Sanity check inputs, warn if ENABLED_CHECKING. (print_containing_files): New. * line-map.h (struct line_maps): New member last_listed. (print_containing_files, INCLUDED_FROM): New. * Makefile.in: Update. * po/POTFILES.in: Add line-map.c. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44670 138bc75d-0d04-0410-961f-82ee72b054a4
* PR preprocessor/3824neil2001-08-051-1/+4
| | | | | | | | | | * line-map.c: Update comments. * line-map.h: Update comments. * tradcif.y: Don't consider large numbers unsigned. * gcc.dg/cpp/tr-sign.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44651 138bc75d-0d04-0410-961f-82ee72b054a4
* * line-map.c: New.neil2001-08-021-0/+118
* line-map.h: New. * Makefile.in (line-map.o): New. (LIBCPP_OBJS, LIBCPP_DEPS): Update. * c-lex.c (cb_file_change): Update for new cpp_file_change structure. * cpperror.c (print_containing_files): Similarly. (print_location): Update. Don't output a space before _Pragma. * cppfiles.c (stack_include_file): Set to line 1 immediately. (stack_include_filee, cpp_make_system_header): Update. (_cpp_execute_include): Get logical line number right for calling as-yet-unterminated #include. * cpphash.h (struct cpp_reader): Add line_maps. (_cpp_do_file_change): Update. * cppinit.c (cpp_create_reader): Initialize line maps. (cpp_destroy): Destroy line maps. (cpp_start_read): Get logical line number right. * cpplex.c (parse_string): Only warn once for multi-line strings. Use boolean variable for null warning. * cpplib.c (_cpp_handle_directive): End the directive if it isn't already. (do_include_common): End the directive early. (do_line): Don't warn about out-of-range lines in preprocessed source. Update. Remove unused variables. (_cpp_do_file_change): Update for new line mapping. (pragma_cb): New typedef. (cpp_register_pragma): Stop looking ahead before calling the handler. Clean up. (do_pragma_system_header): End directive early. (cpp_get_line_maps): New. (cpp_pop_buffer): Fudge logical line. Update. * cpplib.h: Include line-map.h (enum cpp_fc_reason): Remove. (struct cpp_file_change): Update. (cpp_get_line_maps): New. * cppmain.c (struct_printer): New member map. (cb_file_change): Update for new mappings. * fix-header.c (cb_file_change): Similarly. testsuite: * gcc.dg/cpp/19951025-1.c: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@44584 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud