Skip to content
Snippets Groups Projects
  1. Feb 18, 2006
    • Grigory Zagorodnev's avatar
      cpp.texi (__TIMESTAMP__): Document. · be8ac3e2
      Grigory Zagorodnev authored
      2006-02-17  Grigory Zagorodnev <grigory_zagorodnev@linux.intel.com>
      
      gcc/ChangeLog:
           * doc/cpp.texi (__TIMESTAMP__): Document.
      
      libcpp/ChangeLog:
           * macro.c (_cpp_builtin_macro_text): Handle BT_TIMESTAMP.
           * files.c (_cpp_get_file_stat): New function.
           * include/cpplib.h (builtin_type): Add BT_TIMESTAMP.
           * init.c (builtin_array): Add support for __TIMESTAMP__/BT_TIMESTAMP.
           * internal.h (_cpp_get_file_stat): Prototype.
           (struct cpp_buffer): Add timestamp.
      
      gcc/testsuite/ChangeLog:
           * gcc.dg/cpp/undef3.c: New test.
           * gcc.dg/cpp/trad/builtins2.c: New test.
      
      From-SVN: r111232
      be8ac3e2
  2. Nov 04, 2005
  3. Oct 21, 2005
    • James E Wilson's avatar
      Fix bug with -MM -MG. · 6568f34b
      James E Wilson authored
      PR preprocessor/15220
      * files.c (_cpp_find_file): New parameter angle_brackets.  Fix all
      callers.  Pass to open_file_failed.
      (open_file_failed): New parameter angle_brackets.  Fix all callers.
      Use in print_dep assignment.
      * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
      * internal.h (_cpp_find_file): Add new parm to declaration.
      
      From-SVN: r105757
      6568f34b
  4. Aug 30, 2005
    • Jakub Jelinek's avatar
      re PR preprocessor/20348 (File not included when file with same name is included before) · f5eab47e
      Jakub Jelinek authored
      	PR preprocessor/20348
      	PR preprocessor/20356
      	* files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
      	2004-06-05 changes.
      
      	* gcc.dg/cpp/pr20348.c: New test.
      	* gcc.dg/cpp/pr20348.h: New file.
      	* gcc.dg/cpp/inc/pr20348.h: New file.
      	* gcc.dg/cpp/inc/pr20348-aux.h: New file.
      	* gcc.dg/cpp/pr20356.c: New test.
      	* gcc.dg/cpp/pr20356.h: New file.
      	* gcc.dg/cpp/inc/pr20356.h: New file.
      	* gcc.dg/cpp/inc/pr20356-aux.h: New file.
      
      From-SVN: r103629
      f5eab47e
  5. Jun 29, 2005
  6. 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
  7. Apr 28, 2005
  8. Feb 14, 2005
  9. Feb 09, 2005
    • Mike Stump's avatar
      files.c (pchf_adder): Remove. · ecddfb39
      Mike Stump authored
              * files.c (pchf_adder): Remove.
              (struct pchf_adder_info): Likewise.
              (_cpp_save_file_entries): Write out all files so that #import works.
      
      From-SVN: r94755
      ecddfb39
  10. Jan 04, 2005
    • Geoffrey Keating's avatar
      Index: libcpp/ChangeLog · 942926ad
      Geoffrey Keating authored
      2005-01-03  Geoffrey Keating  <geoffk@apple.com>
      
      	* files.c (_cpp_find_file): Add files found by search_path_exhausted
      	to the list of all files.
      
      Index: gcc/testsuite/ChangeLog
      2005-01-03  Geoffrey Keating  <geoffk@apple.com>
      	    Robert Bowdidge <bowdidge@apple.com>
      
      	* gcc.dg/cpp/subframework1.c: New.
      	* gcc.dg/cpp/frame/one.framework/Frameworks/OneSub.framework/Headers/A.h: New.
      	* gcc.dg/cpp/frame/one.framework/Frameworks/OneSub.framework/Headers/B.h: New.
      	* gcc.dg/cpp/frame/one.framework/Frameworks/OneSub.framework/Headers/C.h: New.
      	* gcc.dg/cpp/frame/one.framework/Headers/one-includeSubs.h: New.
      
      Co-Authored-By: default avatarRobert Bowdidge <bowdidge@apple.com>
      
      From-SVN: r92883
      942926ad
  11. Dec 15, 2004
  12. Jul 16, 2004
  13. Jun 26, 2004
    • Zack Weinberg's avatar
      re PR preprocessor/15933 (Caching of include files breaks compilation) · e83d8d43
      Zack Weinberg authored
      	PR 15933
      	Partially revert patch of 2004-06-05.
      	* files.c (search_cache): Remove pfile argument.  Don't check
      	for file that would be found by "" or <> search here...
      	(_cpp_find_file): ...do it here, before calling find_file_in_dir.
      	Do not apply directory-of-current-file correction to files
      	found by this check.  Rearrange code slightly.
      
      From-SVN: r83714
      e83d8d43
  14. 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
  15. Jun 05, 2004
    • Zack Weinberg's avatar
      Makefile.am: Add makedepend. · c6e83800
      Zack Weinberg authored
      libcpp:
      	* Makefile.am: Add makedepend.
      	* Makefile.in, aclocal.m4: Regenerate.
      	* charset.c: Insert a space to avoid a warning.
      	* directives.c: Include mkdeps.h.
      	(_cpp_handle_directive): Reenable macro expander if appropriate.
      	(undefine_macros): Inline body of _cpp_free_definition for speed.
      	Do not call undef callback or _cpp_warn_if_unused_macro.
      	(cpp_get_deps): New interface.
      	* files.c (search_cache): Add pfile argument.  Check for file
      	that would be found by "" or <> search here...
      	(_cpp_find_file): ...not here.  Correct recorded start_dir of
      	files found by directory-of-current-file search that would be
      	found by "" or <> search.
      	* init.c (cpp_add_dependency_target): Delete.
      	* internal.h (struct lexer_state): Add discarding_output flag.
      	* lex.c (lex_identifier): Compute hash function while scanning.
      	* macro.c (cpp_scan_nooutput): Disable macro expansion outside
      	directives.
      	* makedepend.c: New file.
      	* mkdeps.c (struct deps): Add vpath vector.
      	(apply_vpath, deps_add_vpath): New function.
      	(deps_free): Free vpath vector.
      	(deps_add_dep, deps_add_target): Use apply_vpath.
      	* symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
      	(ht_lookup_with_hash): New function.
      	* cpplib.h, mkdeps.h: Update prototypes.
      	* symtab.h: Update prototypes.
      	(HT_HASHSTEP, HT_FINISH): New macros.
      
      gcc:
      	* Makefile.in (MKDEPS_H): New shorthand.
      	(c-opts.o): Update dependencies.
      	* c-opts.c: Include mkdeps.h.
      	(handle_deferred_opts): Use cpp_get_deps and deps_add_target,
      	not cpp_add_dependency_target.
      
      From-SVN: r82654
      c6e83800
  16. 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
  17. May 05, 2004
    • Mike Stump's avatar
      darwin-c.c (add_framework): Copy the directory name as it can be freed later. · e3c287c9
      Mike Stump authored
      	* config/darwin-c.c (add_framework): Copy the directory name as it
      	can be freed later.  Also, ensure we always allocate enough room
      	for the cached framework information.
      	(find_subframework_header): Keep track of the directory where the
      	subframework header was found.
      	(framework_construct_pathname): Speed up by not trying to re-add a
      	framework.
      	* cppfiles.c (search_path_exhausted): Arrange for the missing
      	header callback to be able to set the directory where the header
      	was found.
      	(cpp_get_dir): Add.
      	* cpplib.h (missing_header_cb): Add a parameter.
      	(cpp_get_dir): Add.
      
      From-SVN: r81534
      e3c287c9
  18. May 03, 2004
  19. Apr 30, 2004
    • Kazu Hirata's avatar
      bb-reorder.c, [...]: Fix comment typos. · 1ae58c30
      Kazu Hirata authored
      	* bb-reorder.c, c-opts.c, cfglayout.c, cgraph.c, cgraphunit.c,
      	cppfiles.c, fold-const.c, ggc-zone.c, loop-doloop.c, optabs.c,
      	reg-stack.c, varasm.c, config/alpha/ev4.md,
      	config/alpha/ev5.md, config/alpha/ev6.md, config/arm/arm.c,
      	config/c4x/c4x.c, config/c4x/c4x.md, config/cris/cris.c,
      	config/cris/cris.h, config/fr30/fr30.h, config/frv/frv.c,
      	config/frv/frv.h, config/frv/frv.md, config/h8300/h8300.c,
      	config/i386/i386.c, config/i386/i386.md, config/i386/winnt.c,
      	config/ia64/itanium2.md, config/ip2k/ip2k.c,
      	config/mips/mips.c, config/mips/mips.h, config/mips/sr71k.md,
      	config/pa/pa.c, config/s390/s390.c, config/sh/sh.c: Fix
      	comment typos.
      
      From-SVN: r81345
      1ae58c30
  20. 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
  21. Mar 04, 2004
    • Mike Stump's avatar
      Add framework support for darwin. · 94d1613b
      Mike Stump authored
      	* c-incpath.c: Include target.h and machmode.h.
      	(add_path): Use a consistent style for cpp_dir.  Initialize
      	p->construct to 0.
      	(add_cpp_dir_path): New.
      	(register_include_chains): Add use of extra_includes callback.
      	(hook_void_int): Add.
      	(target_c_incpath): Add.
      	* c-incpath.h (add_cpp_dir_path): New.
      	(target_c_incpath_s): Add.
      	(target_c_incpath): Add.
      	(C_INCPATH_INIT): Add.
      	* c-opts.c (c_common_missing_argument,
      	c_common_handle_option): Add -F argument processing.
      	* c.opt: Add -F argument processing.
      	* gcc.c (trad_capable_cpp): Add -F argument processing.
      	* cppfiles.c (find_file_in_dir): Update to use construct
      	callback.
      	(search_path_exhausted, cpp_get_path, cpp_get_buffer,
      	cpp_get_prev): New.
      	(_cpp_find_file): Use search_path_exhausted.
      	(make_cpp_dir): Initialize construct to 0.
      	* cpplib.h (missing_header_cb
      	cpp_get_path, cpp_get_buffer, cpp_get_file, cpp_get_prev): New.
      	(cpp_callbacks): Add missing_header
      	(cpp_dir): Add construct.
      	* target-def.h: (TARGET_OPTF): New.
      	* hooks.c (hook_void_int, hook_void_charptr): Add.
      	* hooks.h (hook_void_int, hook_void_charptr): Add.
      	* Makefile.in (c-incpath.o) : Add $(TARGET_H) and
      	$(MACHMODE_H) dependencies.
      	* doc/invoke.texi (Darwin Options): Document -F.
      	* doc/tm.texi (TARGET_EXTRA_INCLUDES): Add.
      	(TARGET_OPTF): Add.
      	* fix-header.c (target_c_incpath): Add.
      
      	* config/darwin-c.c: Add c-incpath.h include.
      	(using_frameworks, find_subframework_file,
      	find_subframework_header, add_system_framework_path,
      	frameworks_in_use, num_frameworks, max_frameworks,
      	add_framework, find_framework, struct framework_header,
      	framework_header_dirs, framework_construct_pathname,
      	find_subframework_file, add_system_framework_path,
      	add_framework_path, framework_defaults,
      	darwin_register_frameworks, find_subframework_header): Add.
      	* config/darwin.h (TARGET_EXTRA_INCLUDES, TARGET_OPTF): New.
      	(TARGET_OPTION_TRANSLATE_TABLE): Add -framework support.
      	(CPP_SPEC): Add __APPLE_CC__ support.
      	* t-darwin (darwin-c.o): Add c-incpath.h dependency.
      
      From-SVN: r78875
      94d1613b
  22. Feb 27, 2004
    • Kazu Hirata's avatar
      c-decl.c, [...]: Fix comment typos and formatting. · a1105617
      Kazu Hirata authored
      	* c-decl.c, c-ppoutput.c, combine.c, cppfiles.c, dwarf2out.c,
      	expr.c, fold-const.c, gcc.c, haifa-sched.c, loop-iv.c,
      	params.def, read-rtl.c, rtl.c, rtlanal.c, toplev.c: Fix
      	comment typos and formatting.  Follow spelling conventions.
      
      From-SVN: r78555
      a1105617
  23. Feb 18, 2004
    • Per Bothner's avatar
      re PR preprocessor/14103 (ICEs on "gcc -E -imacros foo.h baz.c") · 22234f56
      Per Bothner authored
      	* cpphash.h (struct cpp_buffer):  Restore return_at_eof field.  This
      	partly reverts my 2003-10-01 change, because we're back to logically
      	including <command line> inside the main line.
      	* cpplex.c (_cpp_get_fresh_line):  Check return_at_eof field.
      	* cppmacro.c (cpp_scan_nooutput):  Set return_at_eof of current buffer.
      	Fixes PR preprocessor/14103.
      
      	* cppfiles.c (_cpp_stack_include):  When appropriate decrement
      	line_table's highest_location, fixing LAST_SOURCE_LINE_LOCATION.
      	(cpp_push_include):  Don't need to increment pfile's line field.
      	* line-map.h (LAST_SOURCE_LINE_LOCATION):  Only decrement by 1.
      
      	* c-ppoutput.c (print struct):  New first_time field.
      	(init_pp_output):  Set print.first_time.
      	(pp_file_change):  Use print.first_time, rather than MAIN_FILE_P,
      	which is set also for (say) <command line>.  Clear print.first_time.
      
      	* cppfiles.c (struct _cpp_file):  Comment and type for pch field
      	does not match the code, so fix both.
      	(should_stack_file):  Inline include_pch_p function.
      	(include_pch_p):  Remove pointless function.
      
      	* cpphash.h (struct cpp_buffer):  Remove unused search_cached field.
      
      From-SVN: r78049
      22234f56
  24. Feb 11, 2004
    • Per Bothner's avatar
      Represent column numbers using line-map's source_location. · 12f9df4e
      Per Bothner authored
      	The "next available source_location" is now managed internally by
      	line-maps.c rather than by clients.
      	* line-map.h (struct line_map):  New field column_bits.
      	<from_line>:  Rename field to start_location.
      	(struct line_maps):  New fields highest_location and max_column_hint.
      	(linemap_check_files_exited):  New declaration.
      	(linemap_line_start):  New declaration.
      	(linemap_add):  Remove from_line parameter; use highest_location field.
      	(SOURCE_LINE, LAST_SOURCE_LINE):  Modify to use column_bits.
      	(SOURCE_COLUMN, LAST_SOURCE_LINE_LOCATION):  New macros.
      	(CURRENT_LINE_MAP):  Remove macro.
      	(linemap_position_for_column):  New inline function.
      	* line-map.c (linemap_init):  Clear new fields.
      	(linemap_check_files_exited):  New function, extracted from ...
      	(linemap_free):  Use linemap_check_files_exited.
      	(linemap_add):  Remove from_line parameter.  Various updates.
      	(linemap_line_start):  New function.
      	(linemap_lookeup):  Update for new field names.
      	* cpphash.h (struct cpp_reader) <map>:  Field removed.  Because
      	linemap_position_for_column may unpredictably change the current map,
      	it is cleaner and simpler for us to not cache it in cpp_reader.
      	(struct cpp_buffer):  New sysp field.
      	Changed warned_cplusplus_comments and from_stage3 to bitfields.
      	* cppinit.c (cpp_read_min_file):  pfile->map no longer exists.
      	* cpplib.c (do_line, do_linemarker, _cpp_do_file_change):  Get
      	current map using linemap_lookup.
      	(do_linemarker):  Also set buffer's sysp field.
      	(destringize_and_run):  No longer need to decrement current line.
      	* cppfiles.c (_cpp_stack_file):  Set sysp from and in buffer.
      	(search_path_head, open_file_failed):  Use buffer's sysp.
      	(cpp_make_system_header):  Get current map using linemap_lookup.
      	Also set buffer's sysp flag.
      	* cppmacro.c (_cpp_builtin_macro_text):  Likewise use linemap_lookup.
      	* cpphash.h (CPP_INCREMENT_LINE):  New macro.
      	(struct cpp_buffer):  Moved fields saved_cur, saved_rlimit to ...
      	(struct cpp_reader):  ... and adding saved_line_base field.
      	* cpptrad.c (_cpp_overlay_buffer, _cpp_remove_overlay):
      	Update accordingly.  Don't adjust line.
      	(_cpp_scan_out_logical_line):  Use CPP_INCREMENT_LINE.
      	* cpphash.c (CPP_IN_SYSTEM_HEADER):  Replaced macro by ...
      	(cpp_in_system_header):  ... new inline function, using buffer's sysp.
      	* cpperror.c (_cpp_begin_message):  Update to use cpp_in_system_header.
      	* cpplex.c (_cpp_lex_direct):  Likewise.
      	* cppmacro.c (_cpp_builtin_macro_text):  Likewise.
      	* cppmacro.c (_cpp_create_definition):  Use buffer's sysp field.
      	* cpplib.h (struct cpp_token):  Rename line field to src_loc.
      	Remove col field as it is now subsumed by src_loc.
      	* cpperror.c:  Update various field, parameter, and macro names.
      	(print_location):  If col==0, try SOURCE_COLUMN of line.
      	(cpp_error):  Use cur_token's src_loc field, rather than line+col.
      	* cpplib.c (do_diagnostic):  Token's src_loc fields replaces line+col.
      	* cpplex.c (_cpp_process_line_notes, _cpp_lex_direct,
      	_cpp_skip_block_comment):  Use CPP_INCREMENT_LINE.
      	(_cpp_temp_token):  Replace cpp_token's line+col fields by src_loc.
      	(_cpp_get_fresh_line):  Don't need to adjust line for missing newline.
      	(_cpp_lex_direct):  Use linemap_position_for_column.
      	* c-ppoutput.c (maybe_print_line, print_line):  Don't take map
      	parameter.  Instead get it from the line_table global.  Adjust callers.
      	(print):  Remove map field.  Replace line field to src_line.
      	(init_pp_output, account_for_newlines, maybe_print_line):  Adjust.
      	(cb_line_change):  Use SOURCE_COLUMN.  Minor optimizations.
      	(pp_file_change):  Use MAIN_FILE_P since we cannot checked print.map.
      	Use LAST_SOURCE_LINE_LOCATION to "catch up" after #include.
      	* cpptrad.c (copy_comment):  Rename variable.
      	* c-lex.c (map):  Remove static variable, for same reason we removed
      	cpp_reader's map field.
      	(cb_line_change, cb_def_pragma, cb_define, cb_undef):  Hence we need
      	to call linemap_lookup.
      	(cb_line_change):  Token's line field replaced by src_loc.
      	(fe_file_change):  Use MAINFILE_P and LAST_SOURCE_LINE macros.
      	Don't save new_map.
      
      	* cpphash.h, cpperror.c, cpplib.h:  Some renames of fileline to
      	source_location.
      
      From-SVN: r77663
      12f9df4e
  25. Feb 02, 2004
    • Eric Christopher's avatar
      [multiple changes] · 16dd5cfe
      Eric Christopher authored
      2004-02-02  Eric Christopher  <echristo@redhat.com>
                  Zack Weinberg  <zack@codesourcery.com>
      
              * c-opts.c (c_common_handle_option): Add -finput-charset.
              * c.opt: Ditto.
              * cppcharset.c (one_iso88591_to_utf8): Remove.
              (convert_iso88591_utf8): Ditto.
              (conversion_tab): Remove 8859-1 converter.
              (_cpp_input_to_utf8): Remove.
              (_cpp_init_iconv_buffer): Ditto.
              (_cpp_close_iconv_buffer): Ditto.
              (_cpp_convert_input): New function.
              (_cpp_default_encoding): Ditto.
              * cpphash.h: Add/remove prototypes for above.
              * cppfiles.c (read_file_guts): Use _cpp_convert_input.
              * cppinit.c (cpp_create_reader): Use _cpp_default_encoding
              for narrow execution and input character sets.
              * cpplib.c (cpp_push_buffer): Delete uses of removed functions.
              * doc/cppopts.texi: Document -finput-charset.
      
      2004-02-02 Eric Christopher  <echristo@redhat.com>
                 Zack Weinberg  <zack@codesourcery.com>
      
              * gcc.c-torture/execute/wchar_t-1.c: Add -finput-charset.
      
      2004-01-29  Eric Christopher  <echristo@redhat.com>
                  Zack Weinberg  <zack@codesourcery.com>
      
              * testsuite/22_locale/collate/compare/wchar_t/2.cc: Remove xfail. Use
              -finput-charset.
              * testsuite/22_locale/collate/compare/wchar_t/wrapped_env.cc: Ditto.
              * testsuite/22_locale/collate/compare/wchar_t/wrapped_locale.cc: Ditto
              * testsuite/22_locale/collate/hash/wchar_t/2.cc: Ditto.
              * testsuite/22_locale/collate/hash/wchar_t/wrapped_env.cc: Ditto.
              * testsuite/22_locale/collate/hash/wchar_t/wrapped_locale.cc: Ditto.
              * testsuite/22_locale/collate/transform/wchar_t/2.cc: Ditto.
              * testsuite/22_locale/collate/transform/wchar_t/wrapped_env.cc: Ditto.
              * testsuite/22_locale/collate/transform/wchar_t/wrapped_locale.cc:
              Ditto.
      
      From-SVN: r77136
      16dd5cfe
  26. Jan 20, 2004
  27. 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
  28. Dec 31, 2003
  29. Dec 21, 2003
    • Kazu Hirata's avatar
      alias.c: Fix comment formatting. · 6614fd40
      Kazu Hirata authored
      	* alias.c: Fix comment formatting.
      	* alloc-pool.c: Likewise.
      	* bitmap.c: Likewise.
      	* bitmap.h: Likewise.
      	* bt-load.c: Likewise.
      	* c-common.c: Likewise.
      	* c-common.h: Likewise.
      	* c-decl.c: Likewise.
      	* c-opts.c: Likewise.
      	* c-pretty-print.c: Likewise.
      	* caller-save.c: Likewise.
      	* cfghooks.h: Likewise.
      	* cgraph.c: Likewise.
      	* collect2.c: Likewise.
      	* cppfiles.c: Likewise.
      	* cpplib.h: Likewise.
      	* dwarf2out.c: Likewise.
      	* dwarfout.c: Likewise.
      	* emit-rtl.c: Likewise.
      	* final.c: Likewise.
      	* function.c: Likewise.
      	* gcov.c: Likewise.
      	* gcse.c: Likewise.
      	* genemit.c: Likewise.
      	* ggc.h: Likewise.
      	* haifa-sched.c: Likewise.
      	* ifcvt.c: Likewise.
      	* libgcc2.h: Likewise.
      	* loop.c: Likewise.
      	* predict.h: Likewise.
      	* unwind-libunwind.c: Likewise.
      	* varasm.c: Likewise.
      
      From-SVN: r74907
      6614fd40
  30. Dec 05, 2003
    • Per Bothner's avatar
      cppfiles.c (file_hash_hash): New static function. · b92be669
      Per Bothner authored
      	* cppfiles.c (file_hash_hash):  New static function.
      	(hash_string_eq):  Renamed static function to file_hash_eq.
      	(_cpp_init_files):  Create file_hash table with above callbacks.
      	(cpp_included):  Must use htab_find_with_hash insead of htab_find.
      	(_cpp_find_find, make_cpp_dir):  Must use htab_find_slot_with_hash.
      
      From-SVN: r74350
      b92be669
  31. Nov 14, 2003
  32. Nov 08, 2003
    • Geoffrey Keating's avatar
      cppfiles.c (pch_open_file): New parameter 'invalid_pch', set it. · 3d67ba1e
      Geoffrey Keating authored
      2003-11-07  Geoffrey Keating  <geoffk@apple.com>
      
      	* cppfiles.c (pch_open_file): New parameter 'invalid_pch', set it.
      	(find_file_in_dir): Likewise.
      	(_cpp_find_file): Print message if no header file is found
      	but an invalid PCH file was.
      
      2003-11-07  Geoffrey Keating  <geoffk@apple.com>
      
      	* gcc.dg/pch/warn-1.c: Allow for more helpful error message.
      
      From-SVN: r73353
      3d67ba1e
  33. 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
  34. Oct 05, 2003
    • Kazu Hirata's avatar
      c-pretty-print.c: Fix comment typos. · 2067c116
      Kazu Hirata authored
      	* c-pretty-print.c: Fix comment typos.
      	* c-pretty-print.h: Likewise.
      	* calls.c: Likewise.
      	* cfgloopmanip.c: Likewise.
      	* cgraphunit.c: Likewise.
      	* cppfiles.c: Likewise.
      	* final.c: Likewise.
      	* function.c: Likewise.
      	* gcov-io.h: Likewise.
      	* gcse.c: Likewise.
      	* genoutput.c: Likewise.
      	* loop.c: Likewise.
      	* postreload.c: Likewise.
      	* reg-stack.c: Likewise.
      	* regmove.c: Likewise.
      	* sched-int.h: Likewise.
      	* sched-rgn.c: Likewise.
      	* simplify-rtx.c: Likewise.
      	* tree-inline.c: Likewise.
      	* config/m68hc11/m68hc11.h: Likewise.
      	* config/mmix/mmix.c: Likewise.
      	* config/mn10300/mn10300.md: Likewise.
      	* config/sh/sh.h: Likewise.
      
      From-SVN: r72118
      2067c116
  35. Oct 02, 2003
    • Per Bothner's avatar
      cppinit.c (cpp_read_main_file): Split into two functions: Distribute... · 4dc299fb
      Per Bothner authored
      cppinit.c (cpp_read_main_file): Split into two functions: Distribute _cpp_stack_file call over the two functions.
      
      
      	* cppinit.c (cpp_read_main_file):  Split into two functions:
      	Distribute _cpp_stack_file call over the two functions.
      	(cpp_find_main_file):  New function.
      	Don't call _cpp_do_file_change even if working_directory flag set.
      	(cpp_push_main_file):  New function.
      	* cppfiles.c (_cpp_find_failed):  New helper function.
      	(find_file):  Made non-static and renamed to _cpp_find_file.
      	(_cpp_stack_file):  No longer needed.  But note the following.
      	(stack_file):  Made non-static and renamed to _cpp_stack_file.
      	* fix-header.c (cpp_read_main_file):  Replace cpp_read_main_file
      	call with calls to cpp_find_main_file and cpp_push_main_file.
      	(search_path_head):  If there is no current buffer, use main_file.
      	* cpphash.h:  Update function declarations.
      	* cpplib.h:  Update function declarations.
      
      From-SVN: r72014
      4dc299fb
  36. Sep 25, 2003
  37. Aug 21, 2003
  38. Aug 19, 2003
    • Kazu Hirata's avatar
      builtins.c: Fix comment typos. · a98ebe2e
      Kazu Hirata authored
      	* builtins.c: Fix comment typos.
      	* c-common.c: Likewise.
      	* c-decl.c: Likewise.
      	* c-pretty-print.c: Likewise.
      	* cfgbuild.c: Likewise.
      	* cfglayout.c: Likewise.
      	* cfgloopanal.c: Likewise.
      	* cgraphunit.c: Likewise.
      	* cppfiles.c: Likewise.
      	* dwarfout.c: Likewise.
      	* expr.c: Likewise.
      	* fold-const.c: Likewise.
      	* gcse.c: Likewise.
      	* ggc-page.c: Likewise.
      	* haifa-sched.c: Likewise.
      	* pretty-print.c: Likewise.
      	* tree.c: Likewise.
      	* tree.h: Likewise.
      	* value-prof.c: Likewise.
      
      From-SVN: r70583
      a98ebe2e
    • Kazu Hirata's avatar
      c-decl.c: Follow spelling conventions. · 02fa63cd
      Kazu Hirata authored
      	* c-decl.c: Follow spelling conventions.
      	* cppfiles.c: Likewise.
      
      From-SVN: r70578
      02fa63cd
  39. Aug 09, 2003
    • Per Bothner's avatar
      cppinit.c (cpp_read_main_file): Split out source-independent initialization to... · 4169c321
      Per Bothner authored
      cppinit.c (cpp_read_main_file): Split out source-independent initialization to separate function ...
      
      
              * cppinit.c (cpp_read_main_file):  Split out source-independent
              initialization to separate function ...
              (cpp_post_options):  New function.
              * cppfiles.c (cpp_stack_file):  Rename public name to ...
              (_cpp_stack_file):  New internal function name.
              * cpplib.h:  Update accordingly.
              * cppinit.c:  (cpp_create_reader):  Initialize cpp_readers line here.
              (cpp_read_main_file):  Don't initialize line here.
              * c-opts.c (c_common_post_options):  Call cpp_post_options.
              (c_common_parse_file):  Call cpp_read_main_file, not cpp_stack_file.
              * fix-header.c (read_scan_file):  Call cpp_post_options.
      
      From-SVN: r70279
      4169c321
Loading