aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpppch.c
AgeCommit message (Collapse)AuthorFilesLines
2003-08-20cpppch.c (cpp_valid_state): Re-add warning about PCH not used because some ↵Geoffrey Keating1-1/+7
macro is defined. 2003-08-19 Geoffrey Keating <geoffk@apple.com> * cpppch.c (cpp_valid_state): Re-add warning about PCH not used because some macro is defined. Index: testsuite/ChangeLog 2003-08-19 Geoffrey Keating <geoffk@apple.com> * gcc.dg/pch/warn-1.c: New. * gcc.dg/pch/warn-1.hs: New. * lib/dg-pch.exp (dg-pch): Use 'return' not 'continue' to skip not-tested file. From-SVN: r70592
2003-07-13Makefile.in (LIBCPP_DEPS): Remove coretypes.h and $(TM_H).Zack Weinberg1-1/+0
* Makefile.in (LIBCPP_DEPS): Remove coretypes.h and $(TM_H). (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. From-SVN: r69298
2003-06-23basic-block.h: Fix comment formatting.Kazu Hirata1-4/+4
* basic-block.h: Fix comment formatting. * bt-load.c: Likewise. * builtins.c: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-format.c: Likewise. * coverage.c: Likewise. * cpplib.h: Likewise. * cpppch.c: Likewise. * dbxout.c: Likewise. * diagnostic.c: Likewise. * dwarf2out.c: Likewise. * expr.c: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * gcc.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * profile.c: Likewise. * real.h: Likewise. * sched-deps.c: Likewise. From-SVN: r68369
2003-06-17* cpplib.h, cpphash.h, cppcharset.c, cpperror.c, cppexp.cZack Weinberg1-66/+28
* cppfiles.c, cpphash.c, cppinit.c, cpplex.c, cpplib.c * cppmacro.c, cpppch.c, cpptrad.c, cppspec.c: Convert to ISO C: new-style function declarations, no need for PARAMS, no special punctuation on indirect function calls, use string constant concatenation where convenient. From-SVN: r68070
2003-04-19cppfiles.c (ENABLE_VALGRIND_CHECKING, [...]): Remove.Neil Booth1-1/+2
* cppfiles.c (ENABLE_VALGRIND_CHECKING, VALGRIND_DISCARD, MMAP_THRESHOLD, TEST_THRESHOLD, SHOULD_MMAP): Remove. (struct include_file): Remove fefcnt, mapped members. (open_file, stack_include_file, _cpp_pop_file_buffer): Disable caching. (read_include_file): Don't use mmap, terminate buffers in '\r'. (purge_cache): Don't use munmap. * cpphash.h (CPP_BUF_COLUMN): Update. (lexer_state): Remove lexing_comment. (struct _cpp_line_note): New. (struct cpp_buffer): New members cur_note, notes_used, notes_cap, next_line and need_line. Remove col_adjust and saved_flags. (_cpp_process_line_notes, _cpp_clean_line, _cpp_get_fresh_line, _cpp_skip_block_comment, scan_out_logical_line): New. (_cpp_init_mbchar): Remove. * cppinit.c (init_library): Remove call to _cpp_init_mbchar. (cpp_read_main_file): Set line to 1 earlier. (post_options): -traditional-cpp doesn't want trigraphs. * cpplex.c (MULTIBYTE_CHARS): Remove code predicated on this. (add_line_note, _cpp_clean_line, _cpp_process_line_notes, _cpp_get_fresh_line): New. (handle_newline, skip_escaped_newlines, trigraph_p, continue_after_nul, _cpp_init_mbchar): Remove. (get_effective_char): Update. (_cpp_skip_block_comment): Rename from skip_block_comment, simplify. (skip_line_comment): Simplify. (skip_whitespace, parse_identifier, parse_slow, parse_number, parse_string): Update. (cpp_lex_direct): Use clean lines and process line notes. Update. (cpp_interpret_charconst): No MULTIBYTE_CHARS. * cpplib.c (prepare_directive_trad): Call scan_out_logical_line directly. (_cpp_handle_directive): Don't set saved_flags. (run_directive, destringize_and_run, cpp_define, cpp_define_builtin, cpp_undef, handle_assertion, cpp_push_buffer): Update. (_cpp_pop_buffer): Free notes. * cppmacro.c (builtin_macro, paste_tokens): \n terminate buffer. * cpppch.c (cpp_read_state): \n terminate buffer. * cpptrad.c (skip_escaped_newlines, handle_newline): Remove. (copy_comment): Use _cpp_skip_block_comment. (skip_whitespace, lex_identifier, _cpp_read_logical_line_trad): Simplify. (_cpp_overlay_buffer, _cpp_remove_overlay, push_replacement_text, save_replacement_text): Update. (scan_out_logical_line): Update to use clean lines and process line notes. * fix-header.c (read_scan_file): Update. testsuite: * gcc.dg/cpp/_Pragma4.c: Remove stray space. * gcc.dg/cpp/trad/escaped-eof.c: Correct line number. From-SVN: r65808
2003-04-17* cpppch.c (cpp_valid_state): Unconditionally initialize nl.Loren J. Rittle1-1/+1
From-SVN: r65755
2003-04-03cpppch.c (reset_ht): Remove.Matt Austern1-23/+0
* cpppch.c (reset_ht): Remove. (cpp_read_state): Remove loop to reset hashtable identifiers. * ggc-common.c (gt_pch_save): Add call to gt_pch_fixup_stringpool after pch file is written. * ggc.h (gt_pch_fixup_stringpool): Declare. * stringpool.c (ht_copy_and_clear): Define. Callback. Copy hashnode's value to another hashtable, then clear the original. (saved_ident_hash): Define. (gt_pch_save_stringpool): Create saved_ident_hash, use it to store definitions in ident_hash, and clear ident_hash. (gt_pch_fixup_stringpool): Define. Restore definitions from saved_ident_hash to ident_hash, then destroy saved_ident_hash. From-SVN: r65215
2003-03-31cpppch.c (struct cpp_savedstate): Add defs and n_defs members.Matt Austern1-26/+112
* cpppch.c (struct cpp_savedstate): Add defs and n_defs members. (count_defs): Keep track of number of defs as well as total size. (write_defs): Put every definition in cpp_savedstate's defs array. (comp_hashnode): Define. Comparison function for qsort. (cpp_write_pch_deps): Sort definitions before writing them. (struct ht_node_list): Define. Like cpp_savedstate but simpler. (collect_ht_nodes): Define. (cpp_valid_state): When verifying that undefined identifiers in the pch file are still undefined, read a sorted list of undefined identifiers, collect all defined identifiers into a sorted list, and walk through both lists to make sure there's no match. From-SVN: r65101
2003-03-13cpppch.c (cpp_valid_state): Use DL_WARNING_SYSHDR, not DL_WARNING.Benjamin Kosnik1-3/+4
2003-03-12 Benjamin Kosnik <bkoz@redhat.com> * cpppch.c (cpp_valid_state): Use DL_WARNING_SYSHDR, not DL_WARNING. From-SVN: r64293
2003-01-10Merge from pch-branch.Geoffrey Keating1-0/+684
From-SVN: r61136