1 2005-11-03 James E Wilson <wilson@specifix.com>
4 * files.c (_cpp_pop_file_buffer): Set buffer_valid to false.
6 2005-11-04 Joseph S. Myers <joseph@codesourcery.com>
8 * include/cpplib.h (struct cpp_callbacks): Make error take
10 * errors.c (cpp_error): Update call to callback.
12 2005-11-03 Andrew Pinski <pinskia@physics.uc.edu>
15 * macro.c (_cpp_builtin_macro_text): Lower the needed max
17 (cpp_quote_string): Don't octalify non printable
20 2005-11-03 Joseph S. Myers <joseph@codesourcery.com>
23 * include/cpplib.h (struct cpp_options): Add client_diagnostic.
24 (struct cpp_callbacks): Add error.
25 * errors.c (cpp_error): If client_diagnostic, use error callback.
26 * charset.c (convert_escape): Don't use %03o in diagnostic.
28 2005-10-21 James E Wilson <wilson@specifix.com>
31 * files.c (_cpp_find_file): New parameter angle_brackets. Fix all
32 callers. Pass to open_file_failed.
33 (open_file_failed): New parameter angle_brackets. Fix all callers.
34 Use in print_dep assignment.
35 * init.c (cpp_read_main_file): Pass additional arg to _cpp_find_file.
36 * internal.h (_cpp_find_file): Add new parm to declaration.
38 2005-10-08 Kazu Hirata <kazu@codesourcery.com>
40 * configure.ac: Require 64-bit int for arm*-*-*eabi*.
41 * configure: Regenerate.
43 2005-10-04 Ian Lance Taylor <ian@airs.com>
46 * directives.c (check_eol_return_comments): New static function.
47 (parse_include): Add buf parameter. Change all callers.
48 (do_include_common): If not discard comments, turn on
49 save_comments. Pass collected comments to include callback.
50 * include/cpplib.h (struct cpp_callbacks): Add new parameter to
51 include callback: cpp_token list.
53 2005-09-20 Joseph S. Myers <joseph@codesourcery.com>
55 * include/cpplib.h (struct cpp_options): Add extended_identifiers.
56 * init.c (struct lang_flags, lang_defaults): Add
58 (cpp_set_lang): Use it.
59 * lex.c (forms_identifier_p): Check extended_identifiers.
61 2005-08-30 Jakub Jelinek <jakub@redhat.com>
65 * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and
68 2005-07-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
70 * configure.ac (ACX_PROG_CC_WARNING_OPTS): add
71 -Wmissing-format-attribute.
73 * configure: Regenerate.
75 2005-06-29 Kelley Cook <kcook@gcc.gnu.org>
77 * all files: Update FSF address in copyright headers.
78 * makeucnid.c (write_copyright): Update outputted FSF address.
80 2005-06-13 Zack Weinberg <zack@codesourcery.com>
82 * configure.ac: Invoke ZW_CREATE_DEPDIR and
83 ZW_PROG_COMPILER_DEPENDENCIES.
84 * aclocal.m4, configure: Regenerate.
85 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.base, COMPILE):
87 (distclean): Clean up $(DEPDIR) and its contents.
88 (.c.o): Use $(COMPILE).
89 Include $(DEPDIR)/*.Po for most object->header dependencies.
91 2005-05-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
93 * configure.ac: Check declarations for asprintf and vasprintf.
94 * config.in: Regenerate.
95 * configure: Likewise.
97 * charset.c (conversion_loop): Use XRESIZEVEC.
98 (convert_no_conversion): Likewise.
99 (convert_using_iconv): Likewise.
100 (init_iconv_desc): Cast return value of alloca.
101 (cpp_host_to_exec_charset): Use XNEWVEC.
102 (emit_numeric_escape): Use XRESIZEVEC.
103 (cpp_interpret_string): Use XNEWVEC.
104 (cpp_interpret_string): Use XRESIZEVEC.
105 (_cpp_interpret_identifier): Cast return value of alloca.
106 (_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
107 * directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
108 (parse_include): Use XNEWVEC.
109 (insert_pragma_entry): Rename local variable "new" to
111 (save_registered_pragmas): Cast return value of xmemdup.
112 (destringize_and_run): Same for alloca.
113 (parse_assertion): Likewise.
114 (do_assert): Cast allocated storage to proper type.
115 (cpp_define): Likewise.
116 (_cpp_define_builtin): Likewise.
117 (cpp_undef): Likewise.
118 (handle_assertion): Likewise.
119 (cpp_push_buffer): Rename local variable "new" to "new_buffer".
120 * expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
121 (CPP_UMINUS): Likewise.
122 (struct cpp_operator): Rename from struct operator.
123 (_cpp_expand_op_stack): Use XRESIZEVEC.
124 * files.c (pch_open_file): Use XNEWVEC.
125 (pch_open_file): Use XRESIZEVEC.
126 (read_file_guts): Use XNEWVEC and XRESIZEVEC.
127 (dir_name_of_file): Use XNEWVEC.
128 (make_cpp_file): Use XCNEW.
129 (make_cpp_dir): Likewise.
130 (allocate_file_hash_entries): USE XNEWVEC.
131 (cpp_included): Cast return value of htab_find_with_hash.
132 (append_file_to_dir): Use XNEWVEC.
133 (read_filename_string): Likewise. Use XRESIZEVEC too.
134 (read_name_map): Cast return value of alloca. Use XRESIZEVEC.
135 (remap_filename): Use XNEWVEC.
136 (struct pchf_entry): Move definition out of struct pchf_data.
137 (_cpp_save_file_entries): Use XCNEWVAR.
138 (_cpp_read_file_entries): Use XNEWVAR.
139 * identifiers.c (alloc_node): Use XOBNEW.
140 * init.c (cpp_create_reader): Use XCNEW.
141 (cpp_init_builtins): Cast of b->value to enum builtin_type.
142 (read_original_directory): Cast return value of alloca.
143 * lex.c (add_line_note): Use XRESIZEVEC.
144 (warn_about_normalization): Use XNEWVEC.
145 (_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
146 (new_buff): Use XNEWVEC.
147 * line-map.c (linemap_add): Use XRESIZEVEC.
148 * macro.c (builtin_macro): Cast return value of alloca.
149 (paste_tokens): Likewise.
150 (expand_arg): Use XNEWVEC and XRESIZEVEC.
151 (_cpp_save_parameter): Use XRESIZEVEC.
152 (create_iso_definition): Cast allocated storage to proper type.
153 (_cpp_create_definition): Likewise.
154 (cpp_macro_definition): Use XRESIZEVEC.
155 * makedepend.c (add_clm): Use XNEW.
157 * mkdeps.c (munge): Use XNEWVEC.
158 (deps_init): Use XCNEW.
159 (deps_add_target): Use XRESIZEVEC.
160 (deps_add_default_target): Cast return value of alloca.
161 (deps_add_dep): Use XRESIZEVEC.
162 (deps_add_vpath): Likewise. Use XNEWVEC too.
163 (deps_restore): Likewise.
164 * pch.c (save_idents): Use XNEW and XNEWVEC.
165 (cpp_save_state): Use XNEW.
166 (count_defs): Cast return value of htab_find.
167 (write_defs): Likewise.
168 (cpp_write_pch_deps): Use XNEWVEC.
169 (collect_ht_nodes): Use XRESIZEVEC.
170 (cpp_valid_state): Use XNEWVEC.
171 (save_macros): Use XRESIZEVEC. Cast return value of xmemdup.
172 * symtab.c (ht_create): Use XCNEW.
173 (ht_lookup_with_hash): Cast return value of obstack_copy0.
174 (ht_expand): Use XCNEWVEC.
175 * system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
176 (bool): Do not define if __cplusplus.
178 2005-05-12 Zack Weinberg <zack@codesourcery.com>
180 * directives.c (#sccs table entry): Mark IN_I, consistent with #ident.
181 (do_sccs): Delete function definition, #define to do_ident.
182 (do_ident): Don't hardwire directive name.
184 2005-05-12 Ryota Kunisawa <kunisawa@access.co.jp>
187 * configure: Regenerate.
189 2005-04-27 Andris Pavenis <pavenis@latnet.lv>
191 * files.c: Include io.h for DJGPP to get prototype of setmode.
193 2005-04-19 Per Bothner <per@bothner.com>
195 PR preprocessor/20907
196 * line-map.c (linemap_line_start): Fix bug when we need to increse
197 column_bits but can re-use the current line_map.
199 2005-04-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
201 * system.h (fopen, fdopen, freopen): Define these to the unlocked
204 2005-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
206 * configure.ac (libcpp_UNLOCKED_FUNCS): New.
207 (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS.
208 * system.h (putchar, getc, getchar, clearerr, feof, fileno,
209 fflush, fgetc, fgets, ferror, fread): Redefine to the associated
211 (fwrite_unlocked): Fix prototype.
213 * configure, config.in: Regenerate.
215 2005-04-05 Jakub Jelinek <jakub@redhat.com>
217 PR preprocessor/19475
218 * macro.c (create_iso_definition): For < ISO C99, don't
219 pedwarn if there is no whitespace between macro name and its
220 replacement, but the replacement starts with a basic character
223 2005-03-28 Andreas Jaeger <aj@suse.de>
225 * lex.c (warn_about_normalization): Cast field width to int to
228 2005-03-19 Joseph S. Myers <joseph@codesourcery.com>
230 * configure.ac: Consistently use solaris2.1[0-9]* instead of
232 * configure: Regenerate.
234 2005-03-15 Geoffrey Keating <geoffk@apple.com>
236 * charset.c (_cpp_valid_ucn): In identifiers, reject a partial
237 UCN rather than printing an error.
239 2005-03-14 Geoffrey Keating <geoffk@apple.com>
241 * lex.c (forms_identifier_p): Disable UCNs in C89 mode.
243 2005-03-14 Geoffrey Keating <geoffk@apple.com>
245 * init.c (cpp_create_reader): Default warn_normalize to normalized_C.
246 * charset.c: Update for new format of ucnid.h.
247 (ucn_valid_in_identifier): Update for new format of ucnid.h.
248 Add NST parameter, and update it; update callers.
249 (cpp_valid_ucn): Add NST parameter, update callers. Replace abort
251 (convert_ucn): Pass normalize_state to cpp_valid_ucn.
252 * internal.h (struct normalize_state): New.
253 (INITIAL_NORMALIZE_STATE): New.
254 (NORMALIZE_STATE_RESULT): New.
255 (NORMALIZE_STATE_UPDATE_IDNUM): New.
256 (_cpp_valid_ucn): New.
257 * lex.c (warn_about_normalization): New.
258 (forms_identifier_p): Add normalize_state parameter, update callers.
259 (lex_identifier): Add normalize_state parameter, update callers. Keep
261 (lex_number): Likewise.
262 (_cpp_lex_direct): Pass normalize_state to subroutines. Check
263 it with warn_about_normalization.
267 * ucnid.tab: Make appropriate for input to makeucnid.c. Remove
268 comments about obsolete version of C++.
269 * include/cpplib.h (enum cpp_normalize_level): New.
270 (struct cpp_options): Add warn_normalize field.
272 2005-03-11 Geoffrey Keating <geoffk@apple.com>
274 * directives.c (glue_header_name): Update call to cpp_spell_token.
275 * internal.h (_cpp_interpret_identifier): New.
276 * charset.c (_cpp_interpret_identifier): New.
277 (_cpp_valid_ucn): Allow UCN version of '$'.
278 * lex.c (lex_identifier): Add extra parameter to indicate if initial
279 character was '$' or '\'. Support identifiers with UCNs.
280 (forms_identifier_p): Allow UCNs.
281 (_cpp_lex_direct): Pass extra parameter to lex_identifier.
283 (cpp_spell_token): Add FORSTRING parameter. Use it.
284 (cpp_token_as_text): Update call to cpp_spell_token.
285 (cpp_output_token): Write UCNs back out.
286 (stringify_arg): Update call to cpp_spell_token.
287 (paste_tokens): Likewise.
288 (cpp_macro_definition): Likewise.
289 * macro.c (stringify_arg): Likewise.
290 (paste_tokens): Likewise.
291 (cpp_macro_definition): Likewise.
292 * include/cpplib.h: Add parameter to cpp_spell_token.
294 2005-03-04 Jakub Jelinek <jakub@redhat.com>
298 * macro.c (replace_args, cpp_get_token): Copy whole
299 cpp_token_u instead of just cpp_string field from it.
301 2005-02-28 Devang Patel <dpatel@apple.com>
303 * directives.c (do_line): Save sysp early before line table is
306 2005-02-20 Zack Weinberg <zack@codesourcery.com>
309 * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro.
310 (cpp_host_to_exec_charset): New function.
311 * include/cpplib.h: Declare cpp_host_to_exec_charset.
313 2005-02-19 Devang Patel <dpatel@apple.com>
315 * charset.c (_cpp_convert_input): Check '\r' before inserting
318 2005-02-15 Eric Christopher <echristo@redhat.com>
320 PR preprocessor/19077
321 * macro.c (cpp_macro_definition): Move handling of whitespace
322 to PREV_WHITE conditional. Remove overloading of len
325 2005-02-14 Kazu Hirata <kazu@cs.umass.edu>
327 * directives.c, files.c, init.c, internal.h, macro.c, pch.c,
328 traditional.c: Update copyright.
330 2005-02-14 Paolo Bonzini <bonzini@gnu.org>
333 * configure.ac: Check for declaration of basename and getopt.
334 * config.in: Regenerate.
335 * configure: Regenerate.
336 * internal.h (ustrcspn): New.
337 * macro.c (create_iso_definition): Fix allocation of memory.
338 (padding_token): Add cast to remove const-ness.
339 * pch.c (cpp_read_state): Use ustrcspn.
341 2005-02-08 Mike Stump <mrs@apple.com>
343 * files.c (pchf_adder): Remove.
344 (struct pchf_adder_info): Likewise.
345 (_cpp_save_file_entries): Write out all files so that #import works.
347 2005-01-23 Joseph S. Myers <joseph@codesourcery.com>
349 * configure: Regenerate.
351 2005-01-11 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
353 * include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.
355 * include/cpplib.h: Also update copyright years.
357 2005-01-03 Geoffrey Keating <geoffk@apple.com>
359 * files.c (_cpp_find_file): Add files found by search_path_exhausted
360 to the list of all files.
362 2005-01-01 Gabriel Dos Reis <gdr@integrable-solutions.net>
364 * internal.h: Update references to Cpp lib filenames.
365 * directives.c: Likewise.
368 * traditional.c: Likewise.
370 2004-12-15 Eric Botcazou <ebotcazou@libertysurf.fr>
372 PR preprocessor/15167
373 * files.c (destroy_cpp_file): New function.
374 (should_stack_file): Make a new file if the
375 compared file is still stacked.
377 2004-11-28 Nathanael Nerode <neroden@gcc.gnu.org>
379 PR preprocessor/17610
380 * directives.c (do_include_common): Error out if an empty filename
381 is given for #include (or #include_next or #import).
383 2004-11-27 Roger Sayle <roger@eyesopen.com>
384 Zack Weinberg <zack@codesourcery.com>
386 * internal.h: Replace all uses of uchar with unsigned char.
387 * include/cpp-id-data.h: Likewise. Guard typedef of uchar
388 with !IN_GCC, so uchar is only defined whilst building libcpp.
390 2004-11-24 Kelley Cook <kcook@gcc.gnu.org>
392 * aclocal.m4: Regenerate.
394 2004-11-24 Roger Sayle <roger@eyesopen.com>
396 PR preprocessor/15824
397 * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h>
398 directly, instead of the non-existant "system.h" and "ansidecl.h".
399 * configure: Regenerate.
401 2004-11-23 Daniel Jacobowitz <dan@codesourcery.com>
402 Joseph Myers <joseph@codesourcery.com>
404 * internal.h (struct lexer_state): Add in_deferred_pragma.
405 * directives.c (struct pragma_entry): Add allow_expansion.
406 (insert_pragma_entry): Take allow_expansion flag.
407 (register_pragma): Likewise.
408 (cpp_register_pragma): Likewise.
409 (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma.
410 (do_pragma): Honor allow_expansion.
411 (cpp_handle_deferred_pragma): Set in_deferred_pragma.
412 * include/cpplib.h (cpp_register_pragma): Update prototype.
414 2004-11-18 Daniel Jacobowitz <dan@codesourcery.com>
415 Mark Mitchell <mark@codesourcery.com>
417 * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set
418 need_64bit_hwint=yes.
419 * configure: Regenerate.
421 2004-11-09 Joseph S. Myers <joseph@codesourcery.com>
423 * Makefile.in ($(PACKAGE).pot): New rule. Depend on
425 (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword
426 arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2.
427 Remove local srcdir path from generated file.
429 2004-11-04 Zack Weinberg <zack@codesourcery.com>
430 Gerald Pfeifer <gerald@pfeifer.com>
432 * internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H
435 2004-10-27 Zack Weinberg <zack@codesourcery.com>
438 * directives.c (do_pragma): Do not defer pragmas which are unknown.
439 (cpp_handle_deferred_pragma): Add cast to silence warning.
441 2004-10-14 Joseph S. Myers <jsm@polyomino.org.uk>
443 * errors.c (_cpp_begin_message): Print "error: " for errors.
445 2004-10-10 Andreas Jaeger <aj@suse.de>
447 * makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.
448 * Makefile.in (makedepend.o): Add dependency on mkdeps.h.
450 2004-10-08 Andrew Pinski <pinskia@physics.uc.edu>
452 * pch.c (cpp_write_pch_state): Remove variable z as it is not
454 (cpp_read_state): Remove unused variables, m, d and mac_count.
456 2004-09-29 Per Bothner <per@bothner.com>
458 * directives.c (cpp_handle_deferred_pragma): Save, clear and restore
459 cb.line_change. Otherwise do_pragma will call the line_change
460 call-back with a meaningless line number.
462 2004-09-24 Zack Weinberg <zack@codesourcery.com>
464 * configure.ac: Move AC_PROG_MAKE_SET, AC_PROG_INSTALL to
465 programs cluster. Use ACX_PROG_CC_WARNING_OPTS,
466 ACX_PROG_CC_WARNING_ALMOST_PEDANTIC, ACX_PROG_CC_WARNINGS_ARE_ERRORS.
467 * aclocal.m4, configure: Regenerate.
468 * init.c: Include localedir.h.
469 * Makefile.in (WARN_CFLAGS, ALL_CFLAGS): New variables.
471 (.c.o): Use $(ALL_CFLAGS).
472 (localedir.h, localedir.hs): New rules.
473 (clean): Use rm -rf to remove directories.
474 (distclean): Also delete localedir.h and localedir.hs.
475 (init.o): Update dependencies.
477 2004-09-22 Kelley Cook <kcook@gcc.gnu.org>
479 * Makefile.in (aclocal.m4): Update dependencies.
480 * configure.ac (AC_CONFIG_MACRO_DIR): New.
481 * aclocal.m4, configure: Regenerate.
483 2004-09-17 Zack Weinberg <zack@codesourcery.com>
485 * charset.c (_cpp_destroy_iconv, emit_numeric_escape)
486 (_cpp_convert_input, _cpp_default_encoding): Add comments.
487 Some other comments in this file also tweaked.
489 * directives.c (do_pragma): Save current buffer position
490 before lexing the pragma keywords; don't call
491 _cpp_backup_tokens in the defer_pragmas case.
493 2004-09-15 Per Bothner <per@bothner.com>
495 * include/line-map.h (line_map_start): Add parameter names so
496 preceding comment makes sense.
497 (linemap_add): Remove from comment mention of non-existing parameter.
499 2004-09-09 Matt Austern <austern@apple.com>
500 Zack Weinberg <zack@codesourcery.com>
502 * include/cpplib.h (TTYPE_TABLE): Remove CPP_ and SPELL_
503 prefixes throughout. Add entry for PRAGMA. Remove
504 unnecessary "= 0" from EQ.
505 (enum cpp_ttype): Adjust OP and TK definitions to restore
506 prefixes, via token-paste.
507 (CPP_LAST_EQ, CPP_FIRST_DIGRAPH, CPP_LAST_PUNCTUATOR, CPP_LAST_CPP_OP):
508 Change from #defines to additional cpp_ttype enumerators.
509 (struct cpp_options): Add defer_pragmas.
510 (cpp_handle_deferred_pragma): Prototype new interface.
512 * internal.h (struct cpp_reader): Add directive_result.
513 * directives.c (struct pragma_entry): Add is_internal field;
514 give boolean fields type bool.
515 (start_directive): Initialize pfile->directive_result.type.
516 (_cpp_do__Pragma): Likewise.
517 (run_directive): Do not crash if pfile->buffer->prev is NULL.
518 (insert_pragma_entry): Add 'internal' argument; set new->is_internal
520 (register_pragma): New static function, bulk of former
521 cpp_register_pragma here; add 'internal' argument, pass along
522 to insert_pragma_entry.
523 (cpp_register_pragma): Now a wrapper around register_pragma which
524 always passes false for 'internal' argument.
525 (_cpp_init_internal_pragmas): Call register_pragma directly, passing
527 (do_pragma): If CPP_OPTION (pfile, defer_pragmas) and this isn't
528 an internal pragma, save text till the end of the line as a CPP_PRAGMA
529 token instead of executing the pragma.
530 (cpp_handle_deferred_pragma): New interface.
531 * lex.c (token_spellings): Adjust OP and TK definitions to
532 match changes to cpplib.h.
533 (_cpp_lex_token): Check for a directive-result token and
534 return it if present.
535 (cpp_token_val_index): Handle CPP_PRAGMA.
536 * macro.c (cpp_builtin_macro_text): Correct comment.
537 (builtin_macro): Handle directive-result tokens from _cpp_do__Pragma.
539 2004-09-06 Serge Belyshev <belyshev@lubercy.com>
541 PR preprocessor/14699
542 * symtab.c (ht_dump_statistics): Change type of sum_of_squares
543 from size_t to double.
545 2004-08-28 Andreas Schwab <schwab@suse.de>
546 Andreas Jaeger <aj@suse.de>
548 * configure.ac: Set PACKAGE correctly.
549 * configure: Regenerated.
551 2004-08-25 Paolo Bonzini <bonzini@gnu.org>
553 * Makefile.in: Add back top_builddir.
555 2004-08-25 Paolo Bonzini <bonzini@gnu.org>
557 * configure.ac: Replace Automake macro invocations
558 with manual Autoconf checks and substitutions.
559 * configure: Regenerate.
560 * aclocal.m4: Regenerate.
561 * config.in: Regenerate.
562 * Makefile.am: Removed.
563 * Makefile.in: Heavy simplification and reorganization.
565 2004-08-09 Mark Mitchell <mark@codesourcery.com>
567 * configure.ac (arm*-*-eabi*): New target.
568 (arm*-*-symbianelf*): Likewise.
569 * configure: Regenerated.
571 2004-07-24 Bernardo Innocenti <bernie@develer.com>
573 * internal.h (xnew, xcnew, xnewvec, xcnewvec, xobnew): Remove.
574 * directives.c: Use XNEW-family macros from libiberty.
577 * cpplib.h (cpp_deps_style): Export enum with name.
579 2004-07-23 Matthias Klose <doko@debian.org>
581 * init.c (init_library): Use PACKAGE for the text domain.
583 2004-07-16 Andris Pavenis <pavenis@latnet.lv>
585 PR preprocessor/16366
586 * internal.h (struct cpp_reader): New field dir_hash.
587 * files.c (make_cpp_dir): Use dir_hash, not file_hash.
588 (_cpp_init_files, _cpp_cleanup_files): Update for new field.
590 2004-07-04 Neil Booth <neil@duron.akihabara.co.uk>
592 PR preprocessor/16192
593 PR preprocessor/15913
594 PR preprocessor/15572
595 * expr.c (_cpp_parse_expr): Handle remaining cases where an
596 expression is missing.
597 * init.c (post_options): Traditional cpp doesn't do // comments.
599 2004-06-30 Per Bothner <per@bothner.com>
601 * include/line-map.h (fileline): Remove old typedef.
602 * internal.h (struct cpp_reader): Use source_location typedef instead.
604 2004-06-26 Zack Weinberg <zack@codesourcery.com>
606 Partially revert patch of 2004-06-05.
607 * files.c (search_cache): Remove pfile argument. Don't check
608 for file that would be found by "" or <> search here...
609 (_cpp_find_file): ...do it here, before calling find_file_in_dir.
610 Do not apply directory-of-current-file correction to files
611 found by this check. Rearrange code slightly.
613 2004-06-21 Geoffrey Keating <geoffk@apple.com>
615 * files.c (should_stack_file): Correct swapped parameters to call
617 * pch.c (cpp_valid_state): Handle -fpreprocessed.
619 2004-06-15 Paolo Bonzini <bonzini@gnu.org>
621 * Makefile.in: Regenerate with automake 1.8.5.
622 * aclocal.m4: Likewise.
623 * configure: Regenerate.
625 2004-06-11 Zack Weinberg <zack@codesourcery.com>
627 * configure.ac: Don't invoke ACX_HEADER_STDBOOL.
628 * configure, config.in: Regenerate.
629 * system.h: Unconditionally define bool as unsigned char,
630 BOOL_BITFIELD as unsigned int.
631 * .cvsignore: New file.
633 2004-06-09 Geoffrey Keating <geoffk@apple.com>
635 * traditional.c (push_replacement_text): Set macro->traditional.
636 (save_replacement_text): Likewise.
637 * pch.c (cpp_write_pch_state): Don't write list of defined macros.
638 (struct save_macro_item): Delete.
639 (struct save_macro_data): Use a character array not the previous
641 (save_macros): Save macro as text not as internal structures.
642 (cpp_prepare_state): Update for changes to save_macro_data.
643 (cpp_read_state): Don't read macros defined in PCH. Restore
645 * macro.c (create_iso_definition): Honour alloc_subobject.
646 Clear traditional flag.
647 (_cpp_create_definition): Honour alloc_subobject.
648 * lex.c (cpp_token_val_index): New.
649 * internal.h: Include cpp-id-data.h.
650 (uchar): Move definition to cpp-id-data.h.
652 (cpp_macro): Likewise.
653 * directives.c (struct answer): Move to cpp-id-data.h.
654 (do_assert): Honour alloc_subobject.
656 * include/symtab.h (struct ht): Add field 'alloc_subobject'.
657 * include/cpplib.h (struct cpp_string): Add GTY marker.
658 (enum cpp_token_fld_kind): New.
659 (struct cpp_token): Add GTY markers.
660 (cpp_token_val_index): Prototype.
661 (CPP_HASHNODE_VALUE_IDX): New.
662 (struct cpp_hashnode): Don't skip fields of 'value' when marking.
663 * include/cpp-id-data.h: New file.
665 2004-06-09 Paolo Bonzini <bonzini@gnu.org>
667 * Makefile.am (all-local): New.
668 * Makefile.in: Regenerate.
670 2004-06-06 Roger Sayle <roger@eyesopen.com>
672 * Makefile.am (LIBICONV): Declare.
673 (makedepend_LDADD): Use LIBICONV.
674 * Makefile.in: Regenerate.
676 2004-06-05 Andrew Pinski <pinskia@physics.uc.edu>
678 * Makefile.am (LIBINTL): Declare
679 (makedepend_LDADD): Use LIBINTL.
680 * Makefile.in: Regenerate.
682 2004-06-05 Zack Weinberg <zack@codesourcery.com>
684 * Makefile.am: Add makedepend.
685 * Makefile.in, aclocal.m4: Regenerate.
686 * charset.c: Insert a space to avoid a warning.
687 * directives.c: Include mkdeps.h.
688 (_cpp_handle_directive): Reenable macro expander if appropriate.
689 (undefine_macros): Inline body of _cpp_free_definition for speed.
690 Do not call undef callback or _cpp_warn_if_unused_macro.
691 (cpp_get_deps): New interface.
692 * files.c (search_cache): Add pfile argument. Check for file
693 that would be found by "" or <> search here...
694 (_cpp_find_file): ...not here. Correct recorded start_dir of
695 files found by directory-of-current-file search that would be
696 found by "" or <> search.
697 * init.c (cpp_add_dependency_target): Delete.
698 * internal.h (struct lexer_state): Add discarding_output flag.
699 * lex.c (lex_identifier): Compute hash function while scanning.
700 * macro.c (cpp_scan_nooutput): Disable macro expansion outside
702 * makedepend.c: New file.
703 * mkdeps.c (struct deps): Add vpath vector.
704 (apply_vpath, deps_add_vpath): New function.
705 (deps_free): Free vpath vector.
706 (deps_add_dep, deps_add_target): Use apply_vpath.
707 * symtab.c (calc_hash): Use HT_HASHSTEP and HT_FINISH.
708 (ht_lookup_with_hash): New function.
709 * cpplib.h, mkdeps.h: Update prototypes.
710 * symtab.h: Update prototypes.
711 (HT_HASHSTEP, HT_FINISH): New macros.
713 2004-05-29 Geoffrey Keating <geoffk@apple.com>
715 * symtab.c (ht_create): Set entries_owned.
716 (ht_destroy): Honour entries_owned.
717 (ht_expand): Likewise.
719 * include/symtab.h (struct ht): New field 'entries_owned'
720 (ht_load): New prototype.
722 2004-05-26 Paolo Bonzini <bonzini@gnu.org>
725 * configure.ac: Fix m4 quoting when picking
726 the size of HOST_WIDE_INT.
727 * configure: Regenerate.
729 2004-05-25 Paolo Bonzini <bonzini@gnu.org>
731 * Makefile.am: the correct directory for
732 gettext include files is given by @INCINTL@.
733 * Makefile.in: Regenerate.
735 2004-05-24 Paolo Bonzini <bonzini@gnu.org>
737 * system.h [!ENABLE_NLS]: dgettext takes two
740 2004-05-23 Paolo Bonzini <bonzini@gnu.org>
742 Moved libcpp from the gcc subdirectory to the toplevel.
743 * Makefile.am: New file.
744 * Makefile.in: Regenerate.
745 * configure.ac: New file.
746 * configure: Regenerate.
747 * config.in: Regenerate.
748 * charset.c: Moved from gcc/cppcharset.c. Add note about
749 brokenness of input charset detection. Adjust for change
750 in name of cppucnid.h.
751 * errors.c: Moved from gcc/cpperror.c. Do not include intl.h.
752 * expr.c: Moved from gcc/cppexp.c.
753 * files.c: Moved from gcc/cppfiles.c. Do not include intl.h.
754 Remove #define of O_BINARY, it is in system.h.
755 * identifiers.c: Moved from gcc/cpphash.c.
756 * internal.h: Moved from gcc/cpphash.h. Change header
757 guard name. All other files adjusted to match name change.
758 * init.c: Moved from gcc/cppinit.c.
759 (init_library) [ENABLE_NLS]: Call bindtextdomain.
760 * lex.c: Moved from gcc/cpplex.c.
761 * directives.c: Moved from gcc/cpplib.c.
762 * macro.c: Moved from gcc/cppmacro.c.
763 * pch.c: Moved from gcc/cpppch.c. Do not include intl.h.
764 * traditional.c: Moved from gcc/cpptrad.c.
765 * ucnid.h: Moved from gcc/cppucnid.h. Change header
767 * ucnid.pl: Moved from gcc/cppucnid.pl.
768 * ucnid.tab: Moved from gcc/cppucnid.tab. Change header
770 * symtab.c: Moved from gcc/hashtable.c.
771 * line-map.c: Moved from gcc. Do not include intl.h.
772 * mkdeps.c: Moved from gcc.
773 * system.h: New file.
774 * include/cpplib.h: Moved from gcc. Change header guard name.
775 * include/line-map.h: Moved from gcc. Change header guard name.
776 * include/mkdeps.h: Moved from gcc. Change header guard name.
777 * include/symtab.h: Moved from gcc/hashtable.h. Change header