summaryrefslogtreecommitdiff
path: root/gcc/cppfiles.c
Commit message (Collapse)AuthorAgeFilesLines
* Mon Jun 7 13:33:39 1999 Dave Brolley <brolley@cygnus.com>brolley1999-06-071-2/+2
| | | | | | | | | | | | * cpplib.c (do_define): Cast `alloca' return value. (do_include, do_undef, do_pragma): Likewise. * cpphash.c (dump_definition): Cast `xstrdup' and `alloca' return values. * cppfiles.c (initialize_input_buffer): Cast `xmalloc' return values. * gcc/cppspec.c (lang_specific_driver): Cast xmalloc return value. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@27391 138bc75d-0d04-0410-961f-82ee72b054a4
* 1999-05-10 18:21 -0400 Zack Weinberg <zack@rabi.columbia.edu>brolley1999-05-101-45/+93
| | | | | | | | | | | | | | | | | * cppfiles.c (initialize_input_buffer): New function. (finclude): Call it, if pfile->input_buffer is NULL. Accept any character device as an input file. (read_and_prescan): Use pfile->input_buffer and pfile->input_speccase. * cppinit.c (cpp_cleanup): Free pfile->input_buffer and pfile->input_speccase. * cpplib.h (cpp_reader): Add input_buffer, input_speccase, and input_buffer_len members. Use memcpy in CPP_PUTS_Q. * cppmain.c: Buffer output in the token_buffer; throttle number of calls to fwrite; check for errors from fwrite. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26869 138bc75d-0d04-0410-961f-82ee72b054a4
* 1999-04-18 17:46 -0400 Zack Weinberg <zack@rabi.columbia.edu>zack1999-04-181-6/+7
| | | | | | | | * cppfiles.c (find_position, read_and_prescan): Use `unsigned long' variables consistently to count line and column numbers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26539 138bc75d-0d04-0410-961f-82ee72b054a4
* * collect2.c (find_a_file): Use HAVE_DOS_BASED_FILE_SYSTEM in placelaw1999-04-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of the DIR_SEPARATOR test. Consider any file starting with a drivename to be absolute. If the absolute filename test fails and EXECUTABLE_SUFFIX is defined, append EXECUTABLE_SUFFIX to the file and try again. * cppinit.c (base_name): Use HAVE_DOS_BASED_FILE_SYSTEM in place of __MSDOS__ and _WIN32. * cppfiles.c (simplify_pathname): Likewise. * gcc.c (IS_DIR_SEPARATOR): Define new macro. Returns true if a character is a directory separator. (find_a_file): Use it. (convert_filename): Likewise. (process_command): Likewise. (do_spec_1): Likewise. (is_directory): Likewise. (main): Likewise. * prefix.c (IS_DIR_SEPARATOR): Define. Tests whether a character is a directory separator. (translate_name): Use it. (update_path): Change DIR_SEPARATOR_2 to DIR_SEPARATOR. Fix warning in block where '/' is changed to DIR_SEPARATOR. * i386/xm-djgpp.h (DIR_SEPARATOR): Set to '/'. (DIR_SEPARATOR_2): New macro. Set to '\'. (HAVE_DOS_BASED_FILESYS): Define. * i386/xm-mingw32.h: Updated copyright. Set DIR_SEPARATOR_2 to '/'. Define HAVE_DOS_BASED_FILE_SYSTEM. * i386/xm-os2.h: Likewise. * winnt/xm-winnt.h: Likewise. * i386/xm-dos.h: Likewise. Add copyright. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26328 138bc75d-0d04-0410-961f-82ee72b054a4
* 1999-04-06 12:56 -0400 Zack Weinberg <zack@rabi.columbia.edu>zack1999-04-061-1/+2
| | | | | | | | | | | | | * cppexp.c (parse_charconst): Initialize c. (cpp_parse_expr): Initialize rprio. * cppfiles.c (merge_include_chains): Initialize prev. (finclude) Set fp->line_base to fp->buf before returning. * cpphash.c (macroexpand): Initialize token. * cppspec.c (lang_specific_driver): Change suff to const char *const *. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26213 138bc75d-0d04-0410-961f-82ee72b054a4
* Warning fixes:ghazi1999-03-191-6/+6
| | | | | | | | | | | | | | | | | | | | | | | * cccp.c (create_definition): Cast to U_CHAR* when assigning to one. * cppfiles.c (read_and_prescan): Likewise. Start a #define in column 0. * cpplib.c (cpp_define): Cast to U_CHAR* when assigning to one. (cpp_push_buffer): Likewise for cpp_buffer*. (do_include): Change the type of `fbeg' and `fend' to unsigned char*. (do_endif): Cast to char* when assigning to one. (do_assert): Likewise. (do_unassert): Likewise. (cpp_read_check_assertion): Change the type of `name' to U_CHAR*. Don't do unnecessary cast to char* anymore. * genrecog.c (make_insn_sequence): Cast to char** when assigning to one. Cast the first argument of bzero to PTR. * loop.c (strength_reduce): Remove unused variable `note'. * reload1.c (new_insn_chain): Cast to struct insn_chain* when assigning to one. * rtl.c (copy_rtx): Use memcpy instead of bcopy. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25860 138bc75d-0d04-0410-961f-82ee72b054a4
* Wed Mar 17 11:20:29 1999 Dave Brolley <brolley@cygnus.com>brolley1999-03-171-0/+4
| | | | | | | * cppfiles.c (PIPE_BUF): #define PIPE_BUF if not defined already. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25817 138bc75d-0d04-0410-961f-82ee72b054a4
* 1999-03-16 16:06 -0500 Zack Weinberg <zack@rabi.columbia.edu>brolley1999-03-161-104/+221
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cppfiles.c (read_and_prescan): Map backslash-newline to '\r' (which cannot otherwise appear in the processed buffer) and move it out of tokens that it appears in the middle of. Improve performance. (find_position): New function. * cpplib.c: \r (one character) indicates backslash newline, not \\\n (two characters). It cannot appear in the middle of a token. Call CPP_BUMP_LINE (pfile) whenever parsing moves past \n or \r. Increment pfile->lineno whenever a \n is placed into token_buffer. Only one mark can exist at a time, and CPP_BUMP_LINE must not be used while it is active. It is automatically cleared by cpp_pop_buffer and parse_goto_mark. \r is not in is_hor_space or is_space. (NEWLINE_FIX, NEWLINE_FIX1, adjust_position, update_position, count_newlines, parse_move_mark): Removed. (parse_string, copy_comment): New functions. (parse_name): Returns void. (parse_set_mark, parse_clear_mark, parse_goto_mark): Take only one argument, a cpp_reader *. Change for new marking scheme. (skip_comment): Handle CHILL line comments too. Second argument is now first character of comment marker; all callers changed. Issue error for unterminated block comment here. (cpp_skip_hspace): Recognize CHILL comments. (copy_rest_of_line): Likewise. Call skip_comment and parse_string directly, don't go through cpp_get_token. Emit "/**/" for block comments if -traditional (create_definition needs this). (do_define): Don't play with put_out_comments. (cpp_push_buffer): Initialize ->mark to -1. (cpp_buf_line_and_col): Just read out the values in the buffer structure. (output_line_command): Use cpp_buf_line_and_col. Fix formatting. Remove stale code. (cpp_get_token): Break out string parsing code to parse_string. Use skip_comment for CHILL comments too. Use copy_comment for put_out_comments instead of dinking with marks. Remove stale code. Don't call output_line_command unless it's necessary. * cpplib.h (parse_marker): Removed. (struct cpp_buffer): line_base is now a unsigned char *; add `mark' [long], remove `marks' [struct parse_marker *]. (parse_set_mark, parse_clear_mark, parse_goto_mark): Update prototypes. (CPP_BUMP_LINE, CPP_BUMP_BUFFER_LINE): New macros. * cppinit.c (is_hor_space, is_space): '\r' is not considered whitespace. * cppexp.c (cpp_parse_expression): Use cpp_skip_hspace, not SKIP_WHITE_SPACE. * cpphash.c (macarg): Disable line commands while expanding. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25802 138bc75d-0d04-0410-961f-82ee72b054a4
* 1999-03-15 21:39 -0500 Zack Weinberg <zack@rabi.columbia.edu>zack1999-03-151-100/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cppinit.c: Instead of one pending list, keep separate lists for each category of pending option: -D/-U, -A, -include, -imacros. Move the four partial include-path lists into the pending block. Use head and tail pointers so we don't ever have to reverse the lists. (cpp_start_read): Break out blocks of code to their own functions: install_predefs and initialize_dependency_output. Use path_include for C_INCLUDE_PATH and friends as well as CPATH. Remove include_defaults gunk. Warn about the combination of -lang-chill and -trigraphs. Optimize string bashing. Walk each pending list once, deallocating as we go. (append_include_chain): Brought over from cppfiles.c. Mark dirs as system include dirs if and only if appending to system include path. If opts->verbose, print a notice when a dir is dropped from the include path because it doesn't exist. Fix memory leak: this function is not supposed to copy its DIR argument. (nreverse_pending, push_pending): Removed. (APPEND): New macro for adding to pending lists. (path_include): Can now add to any partial include path. (base_name): Bring over from cccp.c. (cpp_options_init): Allocate the pending block. (cpp_handle_option): Add --version. Exit after --help. Fix formatting. Order -ifoo options by frequency of usage. (install_predefs): New function, simplified version of code that was in cpp_start_read. (initialize_dependency_output): Likewise. Understand OBJECT_SUFFIX. * cppfiles.c (simplify_pathname): Export. (merge_include_chains): Don't nreverse the lists. If opts->verbose, print a notice when a duplicate dir is detected and dropped from the include path. (finclude): Fix excessive cleverness in setting fp->system_header_p. (actual_directory): Set x->sysp from CPP_BUFFER (pfile)->system_header_p so that one system header may include another with "". (deps_output): Fix double adjustment of deps_size which would cause all dependencies after the first two lines to be lost. * cpplib.c (cpp_unassert): New function. * cpplib.h: Lay out struct cpp_pending here. Adjust prototypes. Add include_prefix_len to struct cpp_options. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25793 138bc75d-0d04-0410-961f-82ee72b054a4
* * cppfiles.c (INO_T_EQ): Handle UWIN.law1999-03-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | * c-common.c (decl_attributes): Flag unrecognized attribute functions as warnings instead of as errors. Support for i386-pc-uwin. * i386/uwin.h: New file. * i386/xm-uwin.h: New file. * i386/t-uwin: New file. * i386/uwin.asm: New file. * configure.in (i[3456]86-*-uwin*): Define. Add Workaround for vfork bug when hosted on uwin. * configure: Regenerate. * cccp.c (INO_T_EQ): Undefine. UWIN has inodes. (absolute_filename): UWIN uses POSIX pathnames only. * libgcc2.c (getpagesize): Do not define for UWIN. (mprotect): Likewise. * protoize.c (dirent.h): Conditionally include. (fputc): Prototype only if it's not a macro. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25696 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (cppmain.o, cpplib.o, cpphash.o, cppalloc.o,ghazi1999-02-251-2/+2
| | | | | | | | | | | | | cpperror.o, cppexp.o, cppfiles.o, cppinit.o, fix-header.o, scan-decls.o): Don't depend on machmode.h. * cppexp.c: Don't define CHAR_BIT or HOST_BITS_PER_WIDE_INT anymore. Replace all instances of HOST_WIDE_INT with HOST_WIDEST_INT. * cppfiles.c: Likewise. * cpplib.c: Likewise. * cpplib.h: Likewise. Also don't include machmode.h anymore. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25446 138bc75d-0d04-0410-961f-82ee72b054a4
* 1999-02-09 16:42 -0500 Zack Weinberg <zack@rabi.columbia.edu>zack1999-02-091-2/+27
| | | | | | | | | | | * cppfiles.c (finclude): Handle pipes properly under old BSD derivatives. 1999-02-09 16:42 -0500 Melissa O'Neill <oneill@cs.sfu.ca> * system.h: Provide fallback definitions for S_ISCHR, S_ISSOCK, S_ISFIFO, O_NONBLOCK, and O_NOCTTY. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25111 138bc75d-0d04-0410-961f-82ee72b054a4
* * cppfiles.c (read_and_prescan): Cast the result of `xrealloc' toghazi1999-02-061-3/+4
| | | | | | | | | U_CHAR* when assigning to one. Ensure the values of a ?: operator have the same type. * cppinit.c (initialize_char_syntax): Use K&R function definition. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25054 138bc75d-0d04-0410-961f-82ee72b054a4
* 1999-02-04 14:33 -0500 Zack Weinberg <zack@rabi.phys.columbia.edu>brolley1999-02-041-49/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | * cpplib.c (initialize_char_syntax): Move to cppinit.c. (cpp_define): Remove redundant syntax checks. (make_assertion): Rename cpp_assert, remove redundant syntax checks, export. (cpp_options_init): Don't init things to zero twice. (cpp_expand_to_buffer): Use memcpy, not a char-by-char loop. (do_include): Kill excessively verbose import warning that snuck back in in the gcc2 merge. (convert_string): Removed. (do_line): Rewrite with simple last-name-used cache instead of private hashtable. (cpp_start_read): Call initialize_char_syntax here, not... (cpp_reader_init): ...here. (cpp_handle_options): Support the -std switch. * cpplib.h (cpp_buffer): Add last_nominal_fname member. (cpp_options): Add c9x flag. Declare all the is_* tables and trigraph table here, as const. Prototype cpp_assert and initialize_char_syntax. * cppinit.c: New file. * cppfiles.c (read_and_prescan): Optimize. * Makefile.in (LIBCPP_OBJS): Add cppinit.o. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25024 138bc75d-0d04-0410-961f-82ee72b054a4
* 1999-01-26 12:11 -0500 Zack Weinberg <zack@midnite.ec.rhno.columbia.edu>brolley1999-01-261-99/+241
| | | | | | | | | | | | | | | | | | | | | | | | * cppfiles.c (safe_read): Deleted. (read_and_prescan): New function, replaces safe_read, converts and/or warns about trigraphs, silently converts odd line terminators (\r, \n\r, \r\n). Warns about no newline at EOF. (finclude): Use read_and_prescan; turn off nonblocking mode on the input descriptor; remove file-size-examination and no-newline-at-EOF gunk which is longer necessary; be more careful about checking that we've been handed a legitimate file to read (only real files, pipes, and ttys are acceptable). * cpplib.h (cpp_options): Rename no_trigraphs flag to `trigraphs' and invert its sense. (trigraph_table): Declare. (cpp_warning_with_line): Prototype. * cpplib.c: Remove all references to trigraph_pcp. Define trigraph_table; initialize it in initialize_char_syntax. Open files in nonblocking mode. s/no_trigraphs/trigraphs/ throughout, and invert sense. Put cpp_warning_with_line back in and export it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24870 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix copyright dates.law1999-01-061-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24530 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (gcc.o, prefix.o, cccp.o, cpplib.o): Depend on prefix.h.ghazi1999-01-051-15/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | * cccp.c: Include prefix.h, don't prototype prefix.c functions. (new_include_prefix): Constify char* parameters. * cppfiles.c (read_name_map): Likewise. (append_include_chain): Likewise. Also, use a writable char* copy of parameter `dir' which we then modify, rather than using the parameter itself to store the new writable string. (remap_filename): Constify some variables. Also, use a writable char* to store an allocated string which we will be modifying. * cpplib.c: Include prefix.h, don't prototype prefix.c functions. (cpp_start_read): Constify variable `str'. * cpplib.h (append_include_chain): Constify a char* parameter. * gcc.c Include prefix.h, don't prototype prefix.c functions. (add_prefix, save_string): Constify char* parameters. (fatal, error): Add ATTRIBUTE_PRINTF_1 to prototypes. * prefix.c: Include prefix.h. (get_key_value, translate_name, save_string, update_path, set_std_prefix): Constify various char* parameters and variables. (save_string): Use xmalloc, not malloc. (translate_name): Use a writable temporary variable to create and modify a string before setting it to a const char*. * prefix.h: New file to prototype functions exported from prefix.c. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24498 138bc75d-0d04-0410-961f-82ee72b054a4
* 1998-12-15 Zack Weinberg <zack@rabi.phys.columbia.edu>brolley1998-12-151-4/+4
| | | | | | | | | | | * cppalloc.c: Add xstrdup here. * cpplib.h: Remove savestring prototype. * cpplib.c: Remove savestring function. s/savestring/xstrdup/ throughout. * cppfiles.c: s/savestring/xstrdup/ throughout. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24327 138bc75d-0d04-0410-961f-82ee72b054a4
* 1998-11-26 01:17 -0500 Zack Weinberg <zack@rabi.phys.columbia.edu>brolley1998-12-071-31/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cpplib.h (struct cpp_buffer): Replace dir and dlen members with a struct file_name_list pointer. (struct cpp_reader): Add pointer to chain of `actual directory' include searchpath entries. (struct file_name_list): Add *alloc pointer for the sake of the actual-directory chain. Move definition of HOST_WIDE_INT here. (cpp_parse_escape): Change prototype to match changes in cppexp.c. * cppfiles.c (actual_directory): New function. (finclude): Use it to initialize the buffer's actual_dir entry. (find_include_file): We don't need to fix up max_include_len here. * cpplib.c (do_include): Don't allocate a file_name_list on the fly for current directory "" includes, use the one that's been preallocated in pfile->buffer->actual_dir. Hoist out duplicate code from the search_start selection logic. (cpp_reader_init): Initialize pfile->actual_dirs. Remove definition of HOST_WIDE_INT. Change calls to cpp_parse_escape to match changes in cppexp.c (note hardcoded MASK, which is safe since this is the source character set). * cppexp.c: Bring over changes to cpp_parse_escape from cccp.c to handle wide character constants in #if directives. The function now returns a HOST_WIDE_INT, and takes a third argument which is a binary mask for all legal values (0x00ff for 8-bit `char', 0xffff for 16-bit `wchar_t', etc.) Define MAX_CHAR_TYPE_MASK and MAX_WCHAR_TYPE_MASK. Change callers of cpp_parse_escape to match. [Fixes c-torture/execute/widechar-1.c] git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24153 138bc75d-0d04-0410-961f-82ee72b054a4
* * system.h: Include libiberty.h.ghazi1998-11-271-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-aux-info.c: Remove prototypes for concat/concat3. Change function `concat' from fixed parameters to variable parameters, as is done in libiberty. All callers of concat/concat3 changed to use the new `concat' with variable args. * cccp.c: Remove things made redundant by libiberty.h and/or conform to libiberty standards. * cexp.y: Likewise. * collect2.c: Likewise. * config/1750a/1750a.h: Likewise. * cppalloc.c: Likewise. * cppexp.c: Likewise. * cppfiles.c: Likewise. * cpphash.c: Likewise. * cpplib.c: Likewise. * dyn-string.c: Likewise. * fix-header.c: Likewise. * gcc.c: Likewise. * gcov.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * gencheck.c: Likewise. * gencodes.c: Likewise. * genconfig.c: Likewise. * genemit.c: Likewise. * genextract.c: Likewise. * genflags.c: Likewise. * gengenrtl.c: Likewise. * genopinit.c: Likewise. * genoutput.c: Likewise. * genpeep.c: Likewise. * genrecog.c: Likewise. * getpwd.c: Likewise. * halfpic.c: Likewise. * hash.c: Likewise. * mips-tdump.c: Likewise. Wrap malloc/realloc/calloc prototypes in NEED_DECLARATION_* macros. * mips-tfile.c: Remove things made redundant by libiberty.h and/or conform to libiberty standards. (fatal): Fix const-ification of variable `format' in !ANSI_PROTOTYPES case. * prefix.c: Remove things made redundant by libiberty.h and/or conform to libiberty standards. * print-rtl.c: Rename variable `spaces' to `xspaces' to avoid conflicting with function `spaces' from libiberty. * profile.c: Remove things made redundant by libiberty.h and/or conform to libiberty standards. * protoize.c: Likewise. * rtl.h: Likewise. * scan.h: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tree.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23931 138bc75d-0d04-0410-961f-82ee72b054a4
* * cppfiles.c (simplify_pathname): Un-ANSI-fy function definition.ghazi1998-11-261-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23898 138bc75d-0d04-0410-961f-82ee72b054a4
* Wed Nov 25 14:54:46 1998 Zack Weinberg <zack@rabi.phys.columbia.edu>brolley1998-11-251-442/+714
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cpplib.h: Delete struct import_file. Add ihash element to struct cpp_buffer. Delete dont_repeat_files and import_hash_table elements from cpp_reader; change all_include_files to a hash table. Delete all foobar_include / last_foobar_include elements from struct cpp_options; put back four such: quote_include, bracket_include, system_include, after_include. Redo struct file_name_list completely. Add new structure type include_hash. Add prototypes for merge_include_chains and include_hash. Change prototypes for finclude, find_include_file, and append_include_chain to match changes below. * cppfiles.c (simplify_pathname, include_hash, remap_filename, merge_include_chains): New functions. (add_import, lookup_import, open_include_file): Removed. (INO_T_EQ): Define this (copied from cccp.c). (hack_vms_include_specification): Remove all calls and #if 0 out the definition. It was being called incorrectly and at the wrong times. Until a VMSie can look at this, it's better to not pretend to support it. (append_include_chain): Change calling convention; now takes only one directory at a time, and sets up the data structure itself. (redundant_include_p): Rewritten - this is now used for all include redundancy, whether by #ifndef, #import, or #pragma once. Looks up things in the include hash table. (file_cleanup): Decrement pfile->system_include_depth here if it's >0. (find_include_file): Calling convention changed; now passes around a struct include_hash instead of 3 separate parameters. Guts ripped out and replaced with new include_hash mechanism. (finclude): Calling convention changed as for find_include_file. Error exits pulled out-of-line. Reformat. (safe_read): Return a long, not an int. (deps_output): Don't recurse. * cpplib.c (is_system_include): Deleted. (path_include): Fix up call to append_include_chain. (do_include): Fix up calls to find_include_file and finclude. Clean up dependency output a bit. Shorten obnoxiously lengthy #import warning message. Don't decrement pfile->system_include_depth here. (do_pragma): Understand the include_hash structure. Reformat. (do_endif): Correct handling of control macros. Understand the include_hash. (cpp_start_read): Fix up calls to finclude. Call merge_include_chains. (cpp_handle_option): Fix up calls to append_include_chain. Understand the four partial include chains. (cpp_finish): Add debugging code (#if 0-ed out) for the include_hash. (cpp_cleanup): Free the include_hash, not the import hash and the all_include and dont_repeat lists which no longer exist. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23857 138bc75d-0d04-0410-961f-82ee72b054a4
* * configure.in (host_xm_file, build_xm_file, xm_file, tm_file):ghazi1998-11-071-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Arrange to include gansidecl.h in {ht}config.h & tm.h just before the config/ directory headers. (tm_file_list, host_xm_file_list, build_xm_file_list): Handle gansidecl.h in the list of dependencies. * Makefile.in (RTL_BASE_H): Don't depend on gansidecl.h. (TREE_H, DEMANGLE_H, RECOG_H, REGS_H, libgcc2.a, stmp-multilib, mbchar.o, collect2.o, pexecute.o, vfprintf.o, splay-tree.o, gcc.o, gencheck.o, choose-temp.o, mkstemp.o, mkstemp.o, prefix.o, dyn-string.o, cexp.o, cccp.o, cppmain.o, cpplib.o, cpperror.o, cppexp.o, cppfiles.o, cpphash.o, cppalloc.o, scan-decls.o): Likewise. * cccp.c: Don't include gansidecl.h. * cexp.y: Likewise. * collect2.c: Likewise. * config/c4x/c4x.c: Likewise. * config/v850/v850.h: Likewise. * cppalloc.c: Likewise. * cpperror.c: Likewise. * cppexp.c: Likewise. * cppfiles.c: Likewise. * cpphash.c: Likewise. * cpplib.c: Likewise. * cppmain.c: Likewise. * cppulp.c: Likewise. * demangle.h: Likewise. * doprint.c: Likewise. * dyn-string.c: Likewise. * eh-common.h: Likewise. * fix-header.c: Likewise. * frame.c: Likewise. * gcc.c: Likewise. * gcov.c: Likewise. * gen-protos.c: Likewise. * gencheck.c: Likewise. * halfpic.h: Likewise. * hash.c: Likewise. * machmode.h: Likewise. * mbchar.c: Likewise. * prefix.c: Likewise. * protoize.c: Likewise. * recog.h: Likewise. * rtl.h: Likewise. * scan-decls.c: Likewise. * tree.h: Likewise. * varray.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23558 138bc75d-0d04-0410-961f-82ee72b054a4
* 1998-10-28 16:10 -0500 Zack Weinberg <zack@rabi.phys.columbia.edu>brolley1998-10-291-0/+1023
* c-lang.c: Declare extern char *yy_cur if USE_CPPLIB. (lang_init): Call check_newline always. * c-lex.c (init_parse) [USE_CPPLIB=1]: After calling cpp_start_read, set yy_cur and yy_lim to read from parse_in.token_buffer, so that we'll see the first #line directive. * cpplib.c (cpp_start_read): finclude the main input file before processing -include/-imacros. Process -imacros and -include separately, and handle -include by stacking a buffer for the file in question as if it'd been #included. * toplev.c (documented_lang_options) Recognize -H when USE_CPPLIB is on. 1998-10-28 16:09 -0500 Zack Weinberg <zack@rabi.phys.columbia.edu> * cpplib.c: Merge do_once into do_pragma. Break file handling code out of do_include. Move append_include_chain, deps_output, file_cleanup, redundant_include_p, import_hash, lookup_import, add_import, read_filename_string, read_name_map, open_include_file, finclude, safe_read to cppfiles.c. Move prototypes for deps_output, append_include_chain, finclude to cpplib.h. Move definition of struct file_name_list there also. * cppfiles.c: New file. Contains all the above functions broken out of cpplib.c; also hack_vms_include_specification from cccp.c and find_include_file, a new function broken out of do_include. * Makefile.in (cppmain): Depend on cppfiles.o. (fix-header): Likewise. (cppfiles.o): New target. * configure.in (--enable-c-cpplib): Add cppfiles.o to extra_c_objs. Add ../cppfiles.o to extra_cxx_objs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@23424 138bc75d-0d04-0410-961f-82ee72b054a4