OSDN Git Service

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