Skip to content
Snippets Groups Projects
  1. Apr 09, 2010
  2. Sep 22, 2009
  3. Sep 19, 2009
    • Chris Demetriou's avatar
      re PR preprocessor/28435 (-MMD vs not found system header (included from a system header)) · 74dc6a11
      Chris Demetriou authored
      [libcpp/ChangeLog]
      2009-09-18  Chris Demetriou  <cgd@google.com>
      
      	PR preprocessor/28435:
      	* include/cpplib.h (struct cpp_options): Add new member
      	deps.need_preprocessor_output.
      	* files.c (open_file_failed): If preprocessor output is needed
      	always report an error.
      
      [gcc/ChangeLog]
      2009-09-19  Chris Demetriou  <cgd@google.com>
      
      	PR preprocessor/28435:
      	* c-opts.c (c_common_handle_option): For -MD and -MMD, indicate
      	to cpplib that the preprocessor output is needed.
      
      [gcc/testsuite/ChangeLog]
      2009-09-19  Chris Demetriou  <cgd@google.com>
      
      	PR preprocessor/28435:
      	* gcc.dg/cpp/missing-header-MD.c: New test.
      	* gcc.dg/cpp/missing-header-MMD.c: New test.
      	* gcc.dg/cpp/missing-sysheader-MD.c: New test.
      	* gcc.dg/cpp/missing-sysheader-MMD.c: New test.
      
      From-SVN: r151879
      74dc6a11
  4. Jul 18, 2009
    • Jerry Quinn's avatar
      directives.c (do_linemarker, do_line): Use CPP_STRING for ignored enum value. · f1bf410c
      Jerry Quinn authored
      2009-07-17  Jerry Quinn  <jlquinn@optonline.net>
      
      	* directives.c (do_linemarker, do_line): Use CPP_STRING for
      	ignored enum value.
      	* files.c (find_file_in_dir): Add cast from void* to char*.
      	* symtab.c (ht_lookup_with_hash): Add cast from void* to char*.
      	* Makefile.in: (WARN_CFLAGS): Use general and C-specific
      	warnings.
      	(CXX, CXXFLAGS, WARN_CXXFLAGS, ALL_CXXFLAGS,
      	ENABLE_BUILD_WITH_CXX, CCDEPMODE, CXXDEPMODE, COMPILER,
      	COMPILER_FLAGS): New.
      	(DEPMODE): Set from CCDEPMODE or CXXDEPMODE.
      	(COMPILE.base): Use COMPILER instead of CC.  Use COMPILER_FLAGS
      	instead of ALL_CFLAGS.
      	* configure.ac: Invoke AC_PROG_CXX.  Separate C-specific warnings
      	from other warnings.  Add -Wc++-compat to C-specific warnings.
      	Check for --enable-build-with-cxx.  Set and substitute
      	ENABLE_BUILD_WITH_CXX.  Invoke ZW_PROG_COMPILER_DEPENDENCIES
      	according to ENABLE_BUILD_WITH_CXX.  Invoke AC_LANG before
      	AC_CHECK_HEADERS.
      	* configure: Rebuild.
      	* include/cpp-id-data.h: Remove extern "C".
      	* include/line-map.h: Likewise.
      	* include/mkdeps.h: Likewise.
      	* include/symtab.h: Likewise.
      	* internal.h: Likewise.
      
      From-SVN: r149763
      f1bf410c
  5. May 13, 2009
  6. Apr 09, 2009
  7. Mar 31, 2009
    • Joseph Myers's avatar
      re PR preprocessor/15638 (gcc should have option to treat missing headers as fatal) · 47580d22
      Joseph Myers authored
      	PR preprocessor/15638
      gcc:
      	* c-common.c (c_cpp_error): Handle CPP_DL_FATAL.
      
      gcc/fortran:
      	* cpp.c (cb_cpp_error): Handle CPP_DL_FATAL.
      
      gcc/testsuite:
      	* gcc.dg/cpp/missing-header-1.c: New test.
      	* gcc.dg/cpp/include2.c: Only test #include <>.  Expect
      	"compilation terminated" message.
      	* gcc.dg/cpp/include2a.c: New test.  Copy of include2.c but only
      	test #include "".
      	* gcc.dg/pch/counter-2.c, gcc.dg/pch/valid-1.c,
      	gcc.dg/pch/valid-2.c, gcc.dg/pch/warn-1.c: Expect "compilation
      	terminated" message.
      
      libcpp:
      	* files.c (_cpp_find_file): Call open_file_failed after diagnosing
      	invalid PCH.
      	(open_file_failed): Make error for missing file fatal.
      	* include/cpplib.h (CPP_DL_FATAL): Define.
      
      From-SVN: r145341
      47580d22
  8. Jul 31, 2008
    • Jakub Jelinek's avatar
      re PR preprocessor/36649 (-H option doesn't work as expected) · affa55c6
      Jakub Jelinek authored
      	PR preprocessor/36649
      	* files.c (struct report_missing_guard_data): New type.
      	(report_missing_guard): Put paths into an array instead of printing
      	them right away.  Return 1 rather than 0.
      	(report_missing_guard_cmp): New function.
      	(_cpp_report_missing_guards): Sort and print paths gathered by
      	report_missing_guard callback.
      
      	* gcc.dg/pch/cpp-3.hs: Add include guards.
      	* gcc.dg/pch/cpp-3a.h: Likewise.
      	* gcc.dg/pch/cpp-3b.h: Likewise.
      	* gcc.dg/cpp/mi8.c: New test.
      	* gcc.dg/cpp/mi8a.h: New file.
      	* gcc.dg/cpp/mi8b.h: New file.
      	* gcc.dg/cpp/mi8c.h: New file.
      	* gcc.dg/cpp/mi8d.h: New file.
      
      From-SVN: r138432
      affa55c6
  9. Apr 21, 2008
    • Tom Tromey's avatar
      re PR preprocessor/33415 (Can't compile .cpp file with UTF-8 BOM.) · 688e7a53
      Tom Tromey authored
      libcpp
      	PR libcpp/33415:
      	* charset.c (_cpp_convert_input): Add buffer_start argument.
      	Ignore UTF-8 BOM if seen.
      	* internal.h (_cpp_convert_input): Add argument.
      	* files.c (struct _cpp_file) <buffer_start>: New field.
      	(destroy_cpp_file): Free buffer_start, not buffer.
      	(_cpp_pop_file_buffer): Likewise.
      	(read_file_guts): Update.
      gcc/testsuite
      	PR libcpp/33415:
      	* gcc.dg/cpp/pr33415.c: New file.
      
      From-SVN: r134507
      688e7a53
  10. Apr 01, 2008
    • Jakub Jelinek's avatar
      re PR pch/13675 (#including a precompiled header more than once in the same unit fails) · d4c32e1d
      Jakub Jelinek authored
      	PR pch/13675
      	* files.c (struct _cpp_file): Remove pch field.
      	(pch_open_file): Don't set file->pch, just file->pchname.
      	(should_stack_file): After pfile->cb.read_pch call
      	free pchname and clear pchname, don't close file->fd.
      	Test file->pchname instead of file->pch.  Don't close fd after cb.
      	(_cpp_stack_include): Test file->pchname instead of file->pch.
      
      	* c-pch.c (c_common_read_pch): On error close (fd) resp. fclose (f).
      
      From-SVN: r133790
      d4c32e1d
  11. Dec 06, 2007
    • Tom Tromey's avatar
      re PR c/29172 (--combine can't handle #pragma once) · 97f6bd40
      Tom Tromey authored
      gcc
      	PR c/29172:
      	* c-opts.c (c_common_parse_file): Call cpp_clear_file_cache.
      libcpp
      	PR c/29172:
      	* internal.h (struct cpp_reader) <file_hash_entries>: Changed
      	type.
      	<file_hash_entries_allocated, file_hash_entries_used>: Removed.
      	* files.c (FILE_HASH_POOL_SIZE): New macro.
      	(struct file_hash_entry_pool): New.
      	(destroy_all_cpp_files): New function.
      	(allocate_file_hash_entries): Allocate a file_hash_entry_pool.
      	(new_file_hash_entry): Update.
      	(free_file_hash_entries): New function.
      	(_cpp_cleanup_files): Call free_file_hash_entries and
      	destroy_all_cpp_files.
      	(cpp_clear_file_cache): New function.
      	* include/cpplib.h (cpp_clear_file_cache): Declare.
      
      From-SVN: r130656
      97f6bd40
  12. Nov 16, 2007
  13. Nov 12, 2007
    • Tom Tromey's avatar
      re PR c++/17577 (#pragma implementation no longer diagnoses use after file to which it applies) · f1e20710
      Tom Tromey authored
      gcc/cp
      	PR c++/17577:
      	* lex.c (handle_pragma_implementation): Use cpp_included_before.
      gcc/testsuite
      	PR c++/17577:
      	* g++.dg/ext/pr17577.h: New file.
      	* g++.dg/ext/pr17577.C: New file.
      libcpp
      	PR c++/17557:
      	* include/cpplib.h (cpp_included_before): Declare.
      	* files.c (struct file_hash_entry) <location>: New field.
      	(_cpp_find_file): Initialize new field.
      	(make_cpp_dir): Likewise.
      	(cpp_included_before): New function.
      
      From-SVN: r130093
      f1e20710
  14. Jul 30, 2007
    • Ollie Wild's avatar
      directives-only.c: New file. · ccfc4c91
      Ollie Wild authored
      	libcpp/
      	* directives-only.c: New file.
      	* internal.h (struct _cpp_dir_only_callbacks): New.
      	(_cpp_preprocess_dir_only): New function.
      	* directives.c (_cpp_handle_directive): Check directives_only before
      	disabling execution of indented directives.
      	* files.c (_cpp_stack_file): Add directives_only check.
      	* include/cpplib.h (struct cpp_options): Add directives_only.
      	(cpp_init_special_builtins): New function.
      	* init.c (cpp_init_special_builtins): New function.
      	(cpp_init_builtins): Move builtin_array initialization to
      	cpp_init_special_builtins.
      	(post_options): Check directives_only before setting
      	pfile->state.prevent_expansion = 1.
      	* macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
      	is expanded inside a directive while -fdirectives-only is enabled.
      	* Makefile.in (libcpp_a_OBJS): Add directives-only.o.
      	(libcpp_a_SOURCES): Add directives-only.c.
      
      	gcc/
      	* c-ppoutput.c (print_lines_directives_only): New function.
      	(scan_translation_unit_directives_only): New function.
      	(preprocess_file): Add call to scan_translation_unit_directives_only.
      	* c-opts.c (c_common_handle_option): Add OPT_fdirectives_only.
      	(sanitize_cpp_opts): Add default flag_dump_macros setting for
      	-fdirectives-only.  Add errors for -fdirectives-only conflict with
      	-Wunused-macros and -traditional.
      	(finish_options): Add builtin macro initialization for
      	-fdirectives-only + -fpreprocessed.
      	* c.opt (fdirectives-only): New.
      	* doc/cppopts.texi (fdirectives-only): New.
      
      	gcc/testsuite/
      	* gcc.dg/cpp/counter-2.c: New test.
      	* gcc.dg/cpp/counter-3.c: New test.
      	* gcc.dg/cpp/dir-only-1.c: New test.
      	* gcc.dg/cpp/dir-only-1.h: New file.
      	* gcc.dg/cpp/dir-only-2.c: New test.
      	* gcc.dg/cpp/dir-only-3.c: New test.
      	* gcc.dg/cpp/dir-only-3a.h: New file.
      	* gcc.dg/cpp/dir-only-3b.h: New file.
      	* gcc.dg/cpp/dir-only-4.c: New test.
      	* gcc.dg/cpp/dir-only-5.c: New test.
      	* gcc.dg/cpp/dir-only-6.c: New test.
      
      From-SVN: r127066
      ccfc4c91
  15. Jun 17, 2007
  16. Jun 16, 2007
  17. Jun 09, 2007
  18. May 21, 2007
    • Ian Lance Taylor's avatar
      internal.h (struct cpp_reader): Add new fields: nonexistent_file_hash and nonexistent_file_ob. · 0b4cafec
      Ian Lance Taylor authored
      	* internal.h (struct cpp_reader): Add new fields:
      	nonexistent_file_hash and nonexistent_file_ob.
      	* files.c: Include "obstack.h".
      	(find_file_in_dir): Before trying to open the file, look up the
      	path name in the hash table of nonexistent files.  After failing
      	to open the file, add the path name to the hash table.
      	(_cpp_find_file): Cache the results of looking up the file name
      	starting with the quote and bracket chain heads, if we can.
      	(nonexistent_file_hash_eq): New static function.
      	(_cpp_init_files): Initialize pfile->nonexistent_file_hash and
      	pfile->nonexistent_file_ob.
      	(_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
      	pfile->nonexistent_file_ob.
      
      From-SVN: r124929
      0b4cafec
  19. 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
  20. Nov 04, 2005
  21. 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
  22. 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
  23. Jun 29, 2005
  24. 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
  25. Apr 28, 2005
  26. Feb 14, 2005
  27. 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
  28. 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
  29. Dec 15, 2004
  30. Jul 16, 2004
  31. 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
  32. 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
  33. 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
  34. 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
  35. 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
  36. May 03, 2004
  37. 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
  38. 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
  39. 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
  40. 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
Loading