Skip to content
Snippets Groups Projects
  1. Jun 29, 2005
  2. May 28, 2005
    • Gabriel Dos Reis's avatar
      configure.ac: Check declarations for asprintf and vasprintf. · c3f829c1
      Gabriel Dos Reis authored
      	* configure.ac: Check declarations for asprintf and vasprintf.
      	* config.in: Regenerate.
      	* configure: Likewise.
      
      	* charset.c (conversion_loop): Use XRESIZEVEC.
      	(convert_no_conversion): Likewise.
      	(convert_using_iconv): Likewise.
      	(init_iconv_desc): Cast return value of alloca.
      	(cpp_host_to_exec_charset): Use XNEWVEC.
      	(emit_numeric_escape): Use XRESIZEVEC.
      	(cpp_interpret_string): Use XNEWVEC.
      	(cpp_interpret_string): Use XRESIZEVEC.
      	(_cpp_interpret_identifier): Cast return value of alloca.
      	(_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
      	* directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
      	(parse_include): Use XNEWVEC.
      	(insert_pragma_entry): Rename local variable "new" to
      	"new_entry".
      	(save_registered_pragmas): Cast return value of xmemdup.
      	(destringize_and_run): Same for alloca.
      	(parse_assertion): Likewise.
      	(do_assert): Cast allocated storage to proper type.
      	(cpp_define): Likewise.
      	(_cpp_define_builtin): Likewise.
      	(cpp_undef): Likewise.
      	(handle_assertion): Likewise.
      	(cpp_push_buffer): Rename local variable "new" to "new_buffer".
      	* expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
      	(CPP_UMINUS): Likewise.
      	(struct cpp_operator): Rename from struct operator.
      	(_cpp_expand_op_stack): Use XRESIZEVEC.
      	* files.c (pch_open_file): Use XNEWVEC.
      	(pch_open_file): Use XRESIZEVEC.
      	(read_file_guts): Use XNEWVEC and XRESIZEVEC.
      	(dir_name_of_file): Use XNEWVEC.
      	(make_cpp_file): Use XCNEW.
      	(make_cpp_dir): Likewise.
      	(allocate_file_hash_entries): USE XNEWVEC.
      	(cpp_included): Cast return value of htab_find_with_hash.
      	(append_file_to_dir): Use XNEWVEC.
      	(read_filename_string): Likewise. Use XRESIZEVEC too.
      	(read_name_map): Cast return value of alloca.  Use XRESIZEVEC.
      	(remap_filename): Use XNEWVEC.
      	(struct pchf_entry): Move definition out of struct pchf_data.
      	(_cpp_save_file_entries): Use XCNEWVAR.
      	(_cpp_read_file_entries): Use XNEWVAR.
      	* identifiers.c (alloc_node): Use XOBNEW.
      	* init.c (cpp_create_reader): Use XCNEW.
      	(cpp_init_builtins): Cast of b->value to enum builtin_type.
      	(read_original_directory): Cast return value of alloca.
      	* lex.c (add_line_note): Use XRESIZEVEC.
      	(warn_about_normalization): Use XNEWVEC.
      	(_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
      	(new_buff): Use XNEWVEC.
      	* line-map.c (linemap_add): Use XRESIZEVEC.
      	* macro.c (builtin_macro): Cast return value of alloca.
      	(paste_tokens): Likewise.
      	(expand_arg): Use XNEWVEC and XRESIZEVEC.
      	(_cpp_save_parameter): Use XRESIZEVEC.
      	(create_iso_definition): Cast allocated storage to proper type.
      	(_cpp_create_definition): Likewise.
      	(cpp_macro_definition): Use XRESIZEVEC.
      	* makedepend.c (add_clm): Use XNEW.
      	(add_dir): Likewise.
      	* mkdeps.c (munge): Use XNEWVEC.
      	(deps_init): Use XCNEW.
      	(deps_add_target): Use XRESIZEVEC.
      	(deps_add_default_target): Cast return value of alloca.
      	(deps_add_dep): Use XRESIZEVEC.
      	(deps_add_vpath): Likewise.  Use XNEWVEC too.
      	(deps_restore): Likewise.
      	* pch.c (save_idents): Use XNEW and XNEWVEC.
      	(cpp_save_state): Use XNEW.
      	(count_defs): Cast return value of htab_find.
      	(write_defs): Likewise.
      	(cpp_write_pch_deps): Use XNEWVEC.
      	(collect_ht_nodes): Use XRESIZEVEC.
      	(cpp_valid_state): Use XNEWVEC.
      	(save_macros): Use XRESIZEVEC.  Cast return value of xmemdup.
      	* symtab.c (ht_create): Use XCNEW.
      	(ht_lookup_with_hash): Cast return value of obstack_copy0.
      	(ht_expand): Use XCNEWVEC.
      	* system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
      	(bool): Do not define if __cplusplus.
      
      From-SVN: r100295
      c3f829c1
  3. Feb 14, 2005
    • Kazu Hirata's avatar
      directives.c, [...]: Update copyright. · 31c3e631
      Kazu Hirata authored
      	* directives.c, files.c, init.c, internal.h, macro.c, pch.c,
      	traditional.c: Update copyright.
      
      From-SVN: r95012
      31c3e631
    • Paolo Bonzini's avatar
      re PR bootstrap/19818 (GCC 4.0 cannot bootstrap itself) · be0f1e54
      Paolo Bonzini authored
      include:
      2005-02-08  Paolo Bonzini  <bonzini@gnu.org>
      
      	PR bootstrap/19818
      	* ansidecl.h (PARAMS): Guard from redefinition.
      
      libcpp:
      2005-02-08  Paolo Bonzini  <bonzini@gnu.org>
      
      	PR bootstrap/19818
      	* configure.ac: Check for declaration of basename and getopt.
      	* config.in: Regenerate.
      	* configure: Regenerate.
      	* internal.h (ustrcspn): New.
      	* macro.c (create_iso_definition): Fix allocation of memory.
      	(padding_token): Add cast to remove const-ness.
      	* pch.c (cpp_read_state): Use ustrcspn.
      
      From-SVN: r95003
      be0f1e54
  4. Oct 08, 2004
  5. Jun 22, 2004
    • Geoffrey Keating's avatar
      c-opts.c (c_common_handle_option): Handle -fpch-preprocess. · c0d578e6
      Geoffrey Keating authored
      2004-06-21  Geoffrey Keating  <geoffk@apple.com>
      
      	* c-opts.c (c_common_handle_option): Handle -fpch-preprocess.
      	* c-common.h (flag_pch_preprocess): Declare.
      	(c_common_pch_pragma): Likewise.
      	* c-common.c (flag_pch_preprocess): New.
      	* c-pch.c (c_common_read_pch): Support -fpreprocess-only.
      	(c_common_pch_pragma): New.
      	* c-ppoutput.c (cb_read_pch): New.
      	(init_pp_output): Support -fpch-preprocess.
      	* c-pragma.c (init_pragma): Support #pragma GNUC pch_preprocess.
      	* c.opt (fpch-preprocess): New.
      	* gcc.c (cpp_options): When save-temps, pass -fpch-preprocess.
      	* doc/cppopts.texi: Document -fpch-preprocess.
      	* doc/invoke.texi (Precompiled Headers): Mention that
      	-fpreprocessed is safe for PCH.  Mention that if an option is
      	listed as safe that doesn't mean it does what you expect.
      
      Index: gcc/testsuite/ChangeLog
      2004-06-21  Geoffrey Keating  <geoffk@apple.com>
      
      	* gcc.dg/pch/save-temps-1.c: New file.
      	* gcc.dg/pch/save-temps-1.hs: New file.
      
      Index: libcpp/ChangeLog
      2004-06-21  Geoffrey Keating  <geoffk@apple.com>
      
      	* files.c (should_stack_file): Correct swapped parameters to call
      	to cb.read_pch.
      	* pch.c (cpp_valid_state): Handle -fpreprocessed.
      
      From-SVN: r83478
      c0d578e6
  6. Jun 09, 2004
    • Geoffrey Keating's avatar
      Index: gcc/ChangeLog · d8044160
      Geoffrey Keating authored
      2004-06-09  Geoffrey Keating  <geoffk@apple.com>
      
      	* Makefile.in (CPPLIB_H): Put files in order of inclusion.
      	(CPP_ID_DATA_H): New.
      	(gtype-desc.o): Update dependencies.
      	(GTFILES): Use CPP_ID_DATA_H.
      
      Index: gcc/testsuite/ChangeLog
      2004-06-09  Geoffrey Keating  <geoffk@apple.com>
      
      	* gcc.dg/pch/macro-4.c: New.
      	* gcc.dg/pch/macro-4.hs: New.
      
      Index: libcpp/ChangeLog
      2004-06-09  Geoffrey Keating  <geoffk@apple.com>
      
      	* traditional.c (push_replacement_text): Set macro->traditional.
      	(save_replacement_text): Likewise.
      	* pch.c (cpp_write_pch_state): Don't write list of defined macros.
      	(struct save_macro_item): Delete.
      	(struct save_macro_data): Use a character array not the previous
      	structured format.
      	(save_macros): Save macro as text not as internal structures.
      	(cpp_prepare_state): Update for changes to save_macro_data.
      	(cpp_read_state): Don't read macros defined in PCH.  Restore
      	-D macros as text.
      	* macro.c (create_iso_definition): Honour alloc_subobject.
      	Clear traditional flag.
      	(_cpp_create_definition): Honour alloc_subobject.
      	* lex.c (cpp_token_val_index): New.
      	* internal.h: Include cpp-id-data.h.
      	(uchar): Move definition to cpp-id-data.h.
      	(U): Likewise.
      	(cpp_macro): Likewise.
      	* directives.c (struct answer): Move to cpp-id-data.h.
      	(do_assert): Honour alloc_subobject.
      
      Index: libcpp/include/ChangeLog
      2004-06-09  Geoffrey Keating  <geoffk@apple.com>
      
      	* symtab.h (struct ht): Add field 'alloc_subobject'.
      	* cpplib.h (struct cpp_string): Add GTY marker.
      	(enum cpp_token_fld_kind): New.
      	(struct cpp_token): Add GTY markers.
      	(cpp_token_val_index): Prototype.
      	(CPP_HASHNODE_VALUE_IDX): New.
      	(struct cpp_hashnode): Don't skip fields of 'value' when marking.
      	* cpp-id-data.h: New file.
      
      From-SVN: r82851
      d8044160
  7. May 24, 2004
    • Paolo Bonzini's avatar
      Makefile.def (host_modules): add libcpp. · 4f4e53dd
      Paolo Bonzini authored
      ChangeLog:
      
      2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	* Makefile.def (host_modules): add libcpp.
      	* Makefile.tpl: Add dependencies on and for libcpp.
      	* Makefile.in: Regenerate.
      	* configure.in: Add libcpp host module.
      	* configure: Regenerate.
      
      config/ChangeLog:
      
      2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	* acx.m4 (ACX_HEADER_STDBOOL, ACX_HEADER_STRING):
      	From gcc.
      
      gcc/ChangeLog:
      
      2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	Move libcpp to the toplevel.
      	* Makefile.in: Remove references to libcpp files,
      	use CPPLIBS instead of libcpp.a.  Define SYMTAB_H
      	and change hashtable.h to that.
      	* aclocal.m4 (gcc_AC_HEADER_STDBOOL,
      	gcc_AC_HEADER_STRING, gcc_AC_C__BOOL): Remove.
      	* configure.ac (gcc_AC_C__BOOL, HAVE_UCHAR): Remove tests.
      	* configure: Regenerate.
      	* config.in: Regenerate.
      	* c-ppoutput.c: Include ../libcpp/internal.h instead of cpphash.h.
      	* cppcharset.c: Removed.
      	* cpperror.c: Removed.
      	* cppexp.c: Removed.
      	* cppfiles.c: Removed.
      	* cpphash.c: Removed.
      	* cpphash.h: Removed.
      	* cppinit.c: Removed.
      	* cpplex.c: Removed.
      	* cpplib.c: Removed.
      	* cpplib.h: Removed.
      	* cppmacro.c: Removed.
      	* cpppch.c: Removed.
      	* cpptrad.c: Removed.
      	* cppucnid.h: Removed.
      	* cppucnid.pl: Removed.
      	* cppucnid.tab: Removed.
      	* hashtable.c: Removed.
      	* hashtable.h: Removed.
      	* line-map.c: Removed.
      	* line-map.h: Removed.
      	* mkdeps.c: Removed.
      	* mkdeps.h: Removed.
      	* stringpool.h: Include symtab.h instead of hashtable.h.
      	* tree.h: Include symtab.h instead of hashtable.h.
      	* system.h (O_NONBLOCK, O_NOCTTY): Do not define.
      
      gcc/cp/ChangeLog:
      
      2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	* Make-lang.in: No need to specify $(LIBCPP).
      
      gcc/java/ChangeLog:
      
      2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	* Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
      
      libcpp/ChangeLog:
      
      2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	Moved libcpp from the gcc subdirectory to the toplevel.
      	* Makefile.am: New file.
      	* Makefile.in: Regenerate.
      	* configure.ac: New file.
      	* configure: Regenerate.
      	* config.in: Regenerate.
      	* charset.c: Moved from gcc/cppcharset.c.  Add note about
      	brokenness of input charset detection.  Adjust for change
      	in name of cppucnid.h.
      	* errors.c: Moved from gcc/cpperror.c.  Do not include intl.h.
      	* expr.c: Moved from gcc/cppexp.c.
      	* files.c: Moved from gcc/cppfiles.c.  Do not include intl.h.
      	Remove #define of O_BINARY, it is in system.h.
      	* identifiers.c: Moved from gcc/cpphash.c.
      	* internal.h: Moved from gcc/cpphash.h.  Change header
      	guard name.  All other files adjusted to match name change.
      	* init.c: Moved from gcc/cppinit.c.
      	(init_library) [ENABLE_NLS]: Call bindtextdomain.
      	* lex.c: Moved from gcc/cpplex.c.
      	* directives.c: Moved from gcc/cpplib.c.
      	* macro.c: Moved from gcc/cppmacro.c.
      	* pch.c: Moved from gcc/cpppch.c.  Do not include intl.h.
      	* traditional.c: Moved from gcc/cpptrad.c.
      	* ucnid.h: Moved from gcc/cppucnid.h.  Change header
      	guard name.
      	* ucnid.pl: Moved from gcc/cppucnid.pl.
      	* ucnid.tab: Moved from gcc/cppucnid.tab.  Change header
      	guard name.
      	* symtab.c: Moved from gcc/hashtable.c.
      	* line-map.c: Moved from gcc.  Do not include intl.h.
      	* mkdeps.c: Moved from gcc.
      	* system.h: New file.
      
      libcpp/include/ChangeLog:
      
      2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	* cpplib.h: Moved from gcc.  Change header guard name.
      	* line-map.h: Moved from gcc.  Change header guard name.
      	* mkdeps.h: Moved from gcc.  Change header guard name.
      	* symtab.h: Moved from gcc/hashtable.h.  Change header
      	guard name.
      
      libcpp/po/ChangeLog:
      
      2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	* be.po: Extracted from gcc/po/be.po.
      	* ca.po: Extracted from gcc/po/ca.po.
      	* da.po: Extracted from gcc/po/da.po.
      	* de.po: Extracted from gcc/po/de.po.
      	* el.po: Extracted from gcc/po/el.po.
      	* es.po: Extracted from gcc/po/es.po.
      	* fr.po: Extracted from gcc/po/fr.po.
      	* ja.po: Extracted from gcc/po/ja.po.
      	* nl.po: Extracted from gcc/po/nl.po.
      	* sv.po: Extracted from gcc/po/sv.po.
      	* tr.po: Extracted from gcc/po/tr.po.
      
      From-SVN: r82199
      4f4e53dd
  8. Apr 23, 2004
    • Per Bothner's avatar
      line-map.h (struct line_maps): New field highest_line. · 500bee0a
      Per Bothner authored
      	* line-map.h (struct line_maps):  New field highest_line.
      	(linemap_position_for_column):  Make non-inline function.
      	(LINEMAP_POSITION_FOR_COLUMN):  New macro.
      	* line-map.c (linemap_init):  Clear highest_line field.
      	(linemap_add):  Set highest_line field.
      	(linemap_line_start):  Minor optimization - use highest_line field.
      	Reduce maximum column hint to 10000.  Update highest_line field.
      	(linemap_position_for_column):  Moved from line-map.h.  Optimize a bit.
      	* cpphash.h (struct cpp_reader):  Remove line field - instead use
      	line_table->highest_line.
      	(saved_line):  Remove unused field.
      	(CPP_INCREMENT_FILE):  Don't do linemap_lookup - just use newest map.
      	Use  line_table's highest_line field instead of cpp_reader's line.
      	* cpplib.c (start_directive):  Likewise use highest_line field.
      	(do_line, do_linemarker):  Likewise just use newest map.
      	(_cpp_do_file_change):  Don't need to set cpp_reader's line field.
      	* cpperror.c (cpp_error):  Likewise use highest_line field.
      	* cppfiles.c (open_file_failed:  Likewise.
      	(cpp_make_system_header):  Likewise use newest map and highest_line.
      	* cppinit.c (cpp_create_reader):  Don't initialize removed field.
      	* cpplex.c (_cpp_process_line_notes, _cpp_skip_block_comment,
      	skip_line_comment, skip_whitespace, _cpp_get_fresh_line,
      	_cpp_lex_direct):  Likewise use highest_line.
      	(_cpp_lex_direct):  Use new LINEMAP_POSITION_FOR_COLUMN macro.
      	* cppmacro.c (_cpp_builtin_macro_text):  Likewise use highest_line,
      	and use newest map.
      	* cpppch.c (cpp_read_state):  Don't save+restore cpp_reader's line.
      	* cpptrad.c (_cpp_overlay_buffer):  Don't save cpp_reader's line.
      	(copy_comment, _cpp_scan_out_logical_line):  Likewise use highest_line.
      
      From-SVN: r81074
      500bee0a
  9. Jan 17, 2004
    • Geoffrey Keating's avatar
      [multiple changes] · 73e61092
      Geoffrey Keating authored
      2004-01-15  Geoffrey Keating  <geoffk@apple.com>
      
      	* Makefile.in (MD5_H): New.
      	(fold-const.o): Depend on md5.h.
      	(dwarf2out.o): Likewise.
      	(cppfiles.o): Likewise.
      	* cppfiles.c: Include md5.h.
      	(should_stack_file): Check against list read from PCH file.
      	(struct pchf_data): New.
      	(pchf): New variable.
      	(struct pchf_adder_info): New.
      	(pchf_adder): New.
      	(pchf_save_compare): New.
      	(_cpp_save_file_entries): New.
      	(_cpp_read_file_entries): New.
      	(struct pchf_compare_data): New.
      	(pchf_compare): New.
      	(check_file_against_entries): New.
      	* cpphash.h (_cpp_save_file_entries): Prototype.
      	(_cpp_read_file_entries): Prototype.
      	* cpppch.c (cpp_write_pch_state): Write the list of headers.
      	(cpp_read_state): Read the list of headers.
      
      Index: testsuite/ChangeLog
      2004-01-16  Geoffrey Keating  <geoffk@apple.com>
      
      	* gcc.dg/pch/import-1.c: New.
      	* gcc.dg/pch/import-1.hs: New.
      	* gcc.dg/pch/import-1a.h: New.
      	* gcc.dg/pch/import-1b.h: New.
      	* gcc.dg/pch/import-1c.h: New.
      
      From-SVN: r76016
      73e61092
  10. Nov 01, 2003
    • John David Anglin's avatar
      re PR preprocessor/12847 (xxx.c:1:20: xxxx.h: No such file or directory) · 0527bc4e
      John David Anglin authored
      	PR preprocessor/12847
      	* cppfiles.c, cppexp.c, cpperror.c, cpplib.h, cpplib.c, cpplex.c,
      	cppinit.c, cpptrad.c, cppmacro.c, fix-header.c, cpppch.c, c-pch.c,
      	c-incpath.c, cppcharset.c (DL_WARNING, DL_WARNING_SYSHDR, DL_PEDWARN,
      	DL_ERROR, DL_ICE, DL_EXTRACT, DL_WARNING_P): Prefix macro names with
      	"CPP_".
      
      From-SVN: r73183
      0527bc4e
  11. Oct 02, 2003
    • Per Bothner's avatar
      cpplib.c (_cpp_pop_buffer): Do generate a _cpp_do_file_change callback even... · 40de9f76
      Per Bothner authored
      cpplib.c (_cpp_pop_buffer): Do generate a _cpp_do_file_change callback even when popping the main file.
      
      
      	* cpplib.c (_cpp_pop_buffer):  Do generate a _cpp_do_file_change
      	callback even when popping the main file.
      
      	* cpplib.c (cpp_push_buffer):  Since we no longer set return_at_eof,
      	remove the unused return_at_eof parameter.
      	* cppfiles.c, cpplib.c, cppmacro.c, cpppch.c, fix-header.c:
      	Update callers of cpp_push_buffer.
      
      From-SVN: r72016
      40de9f76
  12. Aug 20, 2003
  13. Jul 13, 2003
    • Zack Weinberg's avatar
      Makefile.in (LIBCPP_DEPS): Remove coretypes.h and $(TM_H). · 43839642
      Zack Weinberg authored
      	* 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
      43839642
  14. Jun 23, 2003
    • Kazu Hirata's avatar
      basic-block.h: Fix comment formatting. · 71c0e7fc
      Kazu Hirata authored
      	* 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
      71c0e7fc
  15. Jun 17, 2003
    • Zack Weinberg's avatar
      * cpplib.h, cpphash.h, cppcharset.c, cpperror.c, cppexp.c · 6cf87ca4
      Zack Weinberg authored
      	* 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
      6cf87ca4
  16. Apr 19, 2003
    • Neil Booth's avatar
      cppfiles.c (ENABLE_VALGRIND_CHECKING, [...]): Remove. · 26aea073
      Neil Booth authored
      	* 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
      26aea073
  17. Apr 17, 2003
  18. Apr 03, 2003
    • Matt Austern's avatar
      cpppch.c (reset_ht): Remove. · d24ecd21
      Matt Austern authored
      	* 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
      d24ecd21
  19. Mar 31, 2003
    • Matt Austern's avatar
      cpppch.c (struct cpp_savedstate): Add defs and n_defs members. · c419b113
      Matt Austern authored
      	* 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
      c419b113
  20. Mar 13, 2003
  21. Jan 10, 2003
Loading